fix(handler): fix KinoKiste which is now StreamKiste

This commit is contained in:
WebStreamr 2025-06-09 11:27:05 +00:00
parent 6dff634299
commit cbec7c1a01
No known key found for this signature in database
13 changed files with 1910 additions and 1942 deletions

View file

@ -1,5 +1,5 @@
import winston from 'winston';
import { KinoKiste } from './KinoKiste';
import { StreamKiste } from './StreamKiste';
import { ExtractorRegistry } from '../extractor';
import { Fetcher, ImdbId } from '../utils';
import { Context } from '../types';
@ -10,11 +10,11 @@ const logger = winston.createLogger({ transports: [new winston.transports.Consol
const fetcher = new Fetcher();
const ctx: Context = { id: 'id', ip: '127.0.0.1', config: { de: 'on' } };
describe('KinoKiste', () => {
let handler: KinoKiste;
describe('StreamKiste', () => {
let handler: StreamKiste;
beforeEach(() => {
handler = new KinoKiste(fetcher, new ExtractorRegistry(logger, fetcher));
handler = new StreamKiste(fetcher, new ExtractorRegistry(logger, fetcher));
});
test('handles non-existent series gracefully', async () => {

View file

@ -5,10 +5,10 @@ import { ImdbId, Fetcher, getImdbId, Id } from '../utils';
import { ExtractorRegistry } from '../extractor';
import { Context, CountryCode } from '../types';
export class KinoKiste implements Handler {
readonly id = 'kinokiste';
export class StreamKiste implements Handler {
readonly id = 'streamkiste';
readonly label = 'KinoKiste';
readonly label = 'StreamKiste';
readonly contentTypes: ContentType[] = ['series'];
@ -42,17 +42,17 @@ export class KinoKiste implements Handler {
.children('[data-link]')
.map((_i, el) => new URL(($(el).attr('data-link') as string).replace(/^(https:)?\/\//, 'https://')))
.toArray()
.filter(url => !url.host.match(/kinokiste/))
.filter(url => !url.host.match(/streamkiste/))
.map(url => this.extractorRegistry.handle({ ...ctx, referer: seriesPageUrl }, url, { countryCode: 'de', title: `${title.trim()} ${imdbId.series}x${imdbId.episode}` })),
);
};
private fetchSeriesPageUrl = async (ctx: Context, imdbId: ImdbId): Promise<URL | undefined> => {
const html = await this.fetcher.text(ctx, new URL(`https://kinokiste.live/serien/?do=search&subaction=search&story=${imdbId.id}`));
const html = await this.fetcher.text(ctx, new URL(`https://streamkiste.taxi/?story=${imdbId.id}&do=search&subaction=search`));
const $ = cheerio.load(html);
const url = $('.item-video a[href]:first')
const url = $('.res_item a[href]:first')
.map((_i, el) => $(el).attr('href'))
.get(0);

View file

@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`KinoKiste handle imdb black mirror s2e4 1`] = `
exports[`StreamKiste handle imdb black mirror s2e4 1`] = `
[
[
{

View file

@ -2,9 +2,9 @@ export * from './CineHDPlus';
export * from './Eurostreaming';
export * from './Frembed';
export * from './FrenchCloud';
export * from './KinoKiste';
export * from './MeineCloud';
export * from './MostraGuarda';
export * from './Soaper';
export * from './StreamKiste';
export * from './VerHdLink';
export * from './types';

View file

@ -6,7 +6,7 @@ import {
Frembed,
FrenchCloud,
Handler,
KinoKiste,
StreamKiste,
MeineCloud,
MostraGuarda,
Soaper,
@ -38,7 +38,7 @@ const handlers: Handler[] = [
new CineHDPlus(fetcher, extractorRegistry),
new VerHdLink(fetcher, extractorRegistry),
// DE
new KinoKiste(fetcher, extractorRegistry),
new StreamKiste(fetcher, extractorRegistry),
new MeineCloud(fetcher, extractorRegistry),
// FR
new Frembed(fetcher, extractorRegistry),

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -5,7 +5,7 @@ exports[`buildManifest has checked handler with appropriate config 1`] = `
{
"default": "checked",
"key": "de",
"title": "German 🇩🇪 (KinoKiste, MeineCloud)",
"title": "German 🇩🇪 (StreamKiste, MeineCloud)",
"type": "checkbox",
},
{
@ -30,7 +30,7 @@ exports[`buildManifest has unchecked handler without a config 1`] = `
[
{
"key": "de",
"title": "German 🇩🇪 (KinoKiste, MeineCloud)",
"title": "German 🇩🇪 (StreamKiste, MeineCloud)",
"type": "checkbox",
},
{

View file

@ -1,6 +1,6 @@
import winston from 'winston';
import { buildManifest } from './manifest';
import { KinoKiste, MeineCloud, VerHdLink } from '../handler';
import { StreamKiste, MeineCloud, VerHdLink } from '../handler';
import { Fetcher } from './Fetcher';
import { ExtractorRegistry } from '../extractor';
jest.mock('../utils/Fetcher');
@ -14,7 +14,7 @@ describe('buildManifest', () => {
const extractorRegistry = new ExtractorRegistry(logger, fetcher);
const handlers = [
new VerHdLink(fetcher, extractorRegistry),
new KinoKiste(fetcher, extractorRegistry),
new StreamKiste(fetcher, extractorRegistry),
new MeineCloud(fetcher, extractorRegistry),
];
@ -27,7 +27,7 @@ describe('buildManifest', () => {
const extractorRegistry = new ExtractorRegistry(logger, fetcher);
const handlers = [
new VerHdLink(fetcher, extractorRegistry),
new KinoKiste(fetcher, extractorRegistry),
new StreamKiste(fetcher, extractorRegistry),
new MeineCloud(fetcher, extractorRegistry),
];
const manifest = buildManifest(handlers, { de: 'on' });