diff --git a/src/extractor/Fsst.test.ts b/src/extractor/Fsst.test.ts deleted file mode 100644 index bb0764c..0000000 --- a/src/extractor/Fsst.test.ts +++ /dev/null @@ -1,24 +0,0 @@ -import winston from 'winston'; -import { createTestContext } from '../test'; -import { FetcherMock } from '../utils'; -import { ExtractorRegistry } from './ExtractorRegistry'; -import { Fsst } from './Fsst'; - -const logger = winston.createLogger({ transports: [new winston.transports.Console({ level: 'nope' })] }); -const extractorRegistry = new ExtractorRegistry(logger, [new Fsst(new FetcherMock(`${__dirname}/__fixtures__/Fsst`))]); - -const ctx = createTestContext(); - -describe('Fsst', () => { - test('Blood & Sinners', async () => { - expect(await extractorRegistry.handle(ctx, new URL('https://fsst.online/embed/900576/'))).toMatchSnapshot(); - }); - - test('Dead City', async () => { - expect(await extractorRegistry.handle(ctx, new URL('https://fsst.online/embed/901994/'))).toMatchSnapshot(); - }); - - test('How to Train Your Dragon', async () => { - expect(await extractorRegistry.handle(ctx, new URL('https://fsst.online/embed/902668/'))).toMatchSnapshot(); - }); -}); diff --git a/src/extractor/Fsst.ts b/src/extractor/Fsst.ts deleted file mode 100644 index 078b0da..0000000 --- a/src/extractor/Fsst.ts +++ /dev/null @@ -1,42 +0,0 @@ -import * as cheerio from 'cheerio'; -import { Context, Format, Meta, UrlResult } from '../types'; -import { Extractor } from './Extractor'; - -export class Fsst extends Extractor { - public readonly id = 'fsst'; - - public readonly label = 'Fsst'; - - public supports(_ctx: Context, url: URL): boolean { - return null !== url.host.match(/fsst/); - }; - - protected async extractInternal(ctx: Context, url: URL, meta: Meta): Promise { - const headers = { Referer: meta.referer ?? url.href }; - - const html = await this.fetcher.text(ctx, url, { headers }); - - const $ = cheerio.load(html); - const title = $('title').text().trim(); - - const filesMatch = html.match(/file:"(.*)"/) as string[]; - - return (filesMatch[1] as string).split(',').map((fileString) => { - const heightAndUrlMatch = fileString.match(/\[?([\d]*)p?]?(.*)/) as string[]; - const fileHref = heightAndUrlMatch[2] as string; - const heightFromFileHrefMatch = fileHref.match(/([\d]+)p/) as string[]; - - return { - url: new URL(fileHref), - format: Format.mp4, - label: this.label, - sourceId: `${this.id}_${meta.countryCodes?.join('_')}`, - meta: { - ...meta, - height: parseInt(heightAndUrlMatch[1] || heightFromFileHrefMatch[1] as string), - title, - }, - }; - }); - }; -} diff --git a/src/extractor/__fixtures__/Fsst/https:fsst.onlineembed900576 b/src/extractor/__fixtures__/Fsst/https:fsst.onlineembed900576 deleted file mode 100644 index 805812c..0000000 --- a/src/extractor/__fixtures__/Fsst/https:fsst.onlineembed900576 +++ /dev/null @@ -1,199 +0,0 @@ - - - - Blood.and.Sinners.2025.mkv - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/extractor/__fixtures__/Fsst/https:fsst.onlineembed901994 b/src/extractor/__fixtures__/Fsst/https:fsst.onlineembed901994 deleted file mode 100644 index e428a36..0000000 --- a/src/extractor/__fixtures__/Fsst/https:fsst.onlineembed901994 +++ /dev/null @@ -1,199 +0,0 @@ - - - - the.walking.dead.dead.city.s02e06.german.dl.1080p.web.x264-wvf.mkv - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/extractor/__fixtures__/Fsst/https:fsst.onlineembed902668 b/src/extractor/__fixtures__/Fsst/https:fsst.onlineembed902668 deleted file mode 100644 index 48465d0..0000000 --- a/src/extractor/__fixtures__/Fsst/https:fsst.onlineembed902668 +++ /dev/null @@ -1,199 +0,0 @@ - - - - How To Train Your Dragon 2025.mp4 - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/extractor/__snapshots__/Fsst.test.ts.snap b/src/extractor/__snapshots__/Fsst.test.ts.snap deleted file mode 100644 index d2ebbe9..0000000 --- a/src/extractor/__snapshots__/Fsst.test.ts.snap +++ /dev/null @@ -1,93 +0,0 @@ -// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing - -exports[`Fsst Blood & Sinners 1`] = ` -[ - { - "format": "mp4", - "label": "Fsst", - "meta": { - "countryCodes": [], - "height": 360, - "title": "Blood.and.Sinners.2025.mkv", - }, - "sourceId": "fsst_", - "url": "https://www.secvideo1.online/get_file/16/a135ab46b1243e41c0282c16d7cdcbcdf0faf7ee79/900000/900576/900576_360p.mp4/", - }, - { - "format": "mp4", - "label": "Fsst", - "meta": { - "countryCodes": [], - "height": 720, - "title": "Blood.and.Sinners.2025.mkv", - }, - "sourceId": "fsst_", - "url": "https://www.secvideo1.online/get_file/16/801a42b7ac11f7e08101fe8c3cb537045ddf5c9b19/900000/900576/900576_720p.mp4/", - }, - { - "format": "mp4", - "label": "Fsst", - "meta": { - "countryCodes": [], - "height": 1080, - "title": "Blood.and.Sinners.2025.mkv", - }, - "sourceId": "fsst_", - "url": "https://www.secvideo1.online/get_file/16/fae180e05d8d7af50fff44c7a24232b5c58023d7f5/900000/900576/900576.mp4/", - }, -] -`; - -exports[`Fsst Dead City 1`] = ` -[ - { - "format": "mp4", - "label": "Fsst", - "meta": { - "countryCodes": [], - "height": 360, - "title": "the.walking.dead.dead.city.s02e06.german.dl.1080p.web.x264-wvf.mkv", - }, - "sourceId": "fsst_", - "url": "https://www.secvideo1.online/get_file/9/99510c9abde68b5e82b08cd2391724050c8e47cc86/901000/901994/901994_360p.mp4/", - }, - { - "format": "mp4", - "label": "Fsst", - "meta": { - "countryCodes": [], - "height": 720, - "title": "the.walking.dead.dead.city.s02e06.german.dl.1080p.web.x264-wvf.mkv", - }, - "sourceId": "fsst_", - "url": "https://www.secvideo1.online/get_file/9/868ae0229e543e7a9a6f7cf4b3df88f45a49aa11fa/901000/901994/901994_720p.mp4/", - }, - { - "format": "mp4", - "label": "Fsst", - "meta": { - "countryCodes": [], - "height": 1080, - "title": "the.walking.dead.dead.city.s02e06.german.dl.1080p.web.x264-wvf.mkv", - }, - "sourceId": "fsst_", - "url": "https://www.secvideo1.online/get_file/9/44ff1bf6024db32840054f00029afb1164408b3c1f/901000/901994/901994.mp4/", - }, -] -`; - -exports[`Fsst How to Train Your Dragon 1`] = ` -[ - { - "format": "mp4", - "label": "Fsst", - "meta": { - "countryCodes": [], - "height": 360, - "title": "How To Train Your Dragon 2025.mp4", - }, - "sourceId": "fsst_", - "url": "https://www.secvideo1.online/get_file/10/648fc9b266670e9ad6756a066a68a8db0b36868457/902000/902668/902668_360p.mp4/", - }, -] -`;