diff --git a/src/extractor/SuperVideo.ts b/src/extractor/SuperVideo.ts index 0f2a1a9..47f5b18 100644 --- a/src/extractor/SuperVideo.ts +++ b/src/extractor/SuperVideo.ts @@ -24,7 +24,11 @@ export class SuperVideo implements Extractor { readonly extract = async (ctx: Context, url: URL, meta: Meta): Promise => { const html = await this.fetcher.text(ctx, url); - const heightAndSizeMatch = html.match(/\d{3,}x(\d{3,}), ([\d.]+ ?[GM]B)/) as string[]; + if (html.includes('This video can be watched as embed only')) { + return await this.extract(ctx, new URL(`/e${url.pathname}`, url.origin), meta); + } + + const heightAndSizeMatch = html.match(/\d{3,}x(\d{3,}), ([\d.]+ ?[GM]B)/); const $ = cheerio.load(html); const title = $('title').text().trim().replace(/^Watch /, '').trim(); @@ -36,8 +40,10 @@ export class SuperVideo implements Extractor { sourceId: `${this.id}_${meta.countryCode.toLowerCase()}`, ttl: this.ttl, meta: { - bytes: bytes.parse(heightAndSizeMatch[2] as string) as number, - height: parseInt(heightAndSizeMatch[1] as string) as number, + ...(heightAndSizeMatch && { + bytes: bytes.parse(heightAndSizeMatch[2] as string) as number, + height: parseInt(heightAndSizeMatch[1] as string) as number, + }), title, ...meta, }, diff --git a/src/handler/KinoGer.test.ts b/src/handler/KinoGer.test.ts index f8c1056..e674cf7 100644 --- a/src/handler/KinoGer.test.ts +++ b/src/handler/KinoGer.test.ts @@ -27,6 +27,11 @@ describe('KinoGer', () => { expect(streams).toHaveLength(0); }); + test('handle imdb dead city s2e5', async () => { + const streams = await handler.handle(ctx, 'series', new ImdbId('tt18546730', 2, 5)); + expect(streams).toMatchSnapshot(); + }); + test('handle imdb dead city s2e6', async () => { const streams = await handler.handle(ctx, 'series', new ImdbId('tt18546730', 2, 6)); expect(streams).toMatchSnapshot(); diff --git a/src/handler/KinoGer.ts b/src/handler/KinoGer.ts index 0d955e6..e1509d7 100644 --- a/src/handler/KinoGer.ts +++ b/src/handler/KinoGer.ts @@ -58,7 +58,7 @@ export class KinoGer implements Handler { episodeUrl = new URL(url.replaceAll('[', '').replaceAll('\'', '').trim()); }); - if (!episodeUrl || !episodeUrl.host.includes('fsst')) { + if (!episodeUrl) { return []; } diff --git a/src/handler/__snapshots__/KinoGer.test.ts.snap b/src/handler/__snapshots__/KinoGer.test.ts.snap index 062f7d5..7ee4608 100644 --- a/src/handler/__snapshots__/KinoGer.test.ts.snap +++ b/src/handler/__snapshots__/KinoGer.test.ts.snap @@ -37,6 +37,23 @@ exports[`KinoGer handle imdb blood and sinners 1`] = ` ] `; +exports[`KinoGer handle imdb dead city s2e5 1`] = ` +[ + [ + { + "label": "SuperVideo", + "meta": { + "countryCode": "de", + "title": "The Walking Dead: Dead City 2x5", + }, + "sourceId": "supervideo_de", + "ttl": 900000, + "url": "https://hfs308.serversicuro.cc/hls/,dnzpe7rf5xg4a3gyva3h5orlyw23xosfzwunl5xbmjpz3lspgri6ztlr5dia,.urlset/master.m3u8", + }, + ], +] +`; + exports[`KinoGer handle imdb dead city s2e6 1`] = ` [ [ diff --git a/src/utils/__fixtures__/Fetcher/https:supervideo.ccbj6szat1pval b/src/utils/__fixtures__/Fetcher/https:supervideo.ccbj6szat1pval new file mode 100644 index 0000000..f2e8807 --- /dev/null +++ b/src/utils/__fixtures__/Fetcher/https:supervideo.ccbj6szat1pval @@ -0,0 +1,129 @@ + + + + + + + Watch the walking dead dead city s02e05 german 1080p web x264 wvf + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + + + + +
+ + +
+ This video can be watched as embed only +
+ +
+ + + + + + + + + \ No newline at end of file diff --git a/src/utils/__fixtures__/Fetcher/https:supervideo.ccebj6szat1pval b/src/utils/__fixtures__/Fetcher/https:supervideo.ccebj6szat1pval new file mode 100644 index 0000000..dc0a26f --- /dev/null +++ b/src/utils/__fixtures__/Fetcher/https:supervideo.ccebj6szat1pval @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
Disable ADBlock plugin and allow pop-ups in your browser to watch video
+
+
+ Upgrade you account to watch videos with no limits! +
+ + + + + + + + + + + + + + + +
+
+ + + + + + + + +