From 556b20e6690c251e86e10740b45ca0b4c614b222 Mon Sep 17 00:00:00 2001 From: WebStreamr <210764791+webstreamr@users.noreply.github.com> Date: Mon, 23 Feb 2026 10:58:55 +0000 Subject: [PATCH] fix(extractor): remove StreamUp --- src/extractor/StreamUp.test.ts | 16 ------ src/extractor/StreamUp.ts | 47 ---------------- ...01e051c992a2b68e70fdcaa6cc18270adee1f7c003 | 4 -- .../StreamUp/https:strmup.to6950ae79eaa4c | 55 ------------------- ...s:strmup.toajaxstreamfilecode6950ae79eaa4c | 1 - .../__snapshots__/StreamUp.test.ts.snap | 17 ------ src/extractor/index.ts | 2 - 7 files changed, 142 deletions(-) delete mode 100644 src/extractor/StreamUp.test.ts delete mode 100644 src/extractor/StreamUp.ts delete mode 100644 src/extractor/__fixtures__/StreamUp/https:s3-hls2-cdn59.strmupcdn.comhlsSJbD5Zm1pj06jZ2LDbHa13YBmryxasmaster.m3u8token35f702a94c0e324d607d8761795a3788-1768016464-104.28.197.7-5ebad85b212e5e349b388501e051c992a2b68e70fdcaa6cc18270adee1f7c003 delete mode 100644 src/extractor/__fixtures__/StreamUp/https:strmup.to6950ae79eaa4c delete mode 100644 src/extractor/__fixtures__/StreamUp/https:strmup.toajaxstreamfilecode6950ae79eaa4c delete mode 100644 src/extractor/__snapshots__/StreamUp.test.ts.snap diff --git a/src/extractor/StreamUp.test.ts b/src/extractor/StreamUp.test.ts deleted file mode 100644 index a4a8b26..0000000 --- a/src/extractor/StreamUp.test.ts +++ /dev/null @@ -1,16 +0,0 @@ -import winston from 'winston'; -import { createTestContext } from '../test'; -import { FetcherMock } from '../utils'; -import { ExtractorRegistry } from './ExtractorRegistry'; -import { StreamUp } from './StreamUp'; - -const logger = winston.createLogger({ transports: [new winston.transports.Console({ level: 'nope' })] }); -const extractorRegistry = new ExtractorRegistry(logger, [new StreamUp(new FetcherMock(`${__dirname}/__fixtures__/StreamUp`))]); - -const ctx = createTestContext(); - -describe('StreamUp', () => { - test('handle one battle after another', async () => { - expect(await extractorRegistry.handle(ctx, new URL('https://strmup.to/6950ae79eaa4c'))).toMatchSnapshot(); - }); -}); diff --git a/src/extractor/StreamUp.ts b/src/extractor/StreamUp.ts deleted file mode 100644 index bd4b663..0000000 --- a/src/extractor/StreamUp.ts +++ /dev/null @@ -1,47 +0,0 @@ -import * as cheerio from 'cheerio'; -import { Context, Format, InternalUrlResult, Meta } from '../types'; -import { guessHeightFromPlaylist } from '../utils'; -import { Extractor } from './Extractor'; - -interface StreamUpApiData { - streaming_url: string; -} - -/** @see https://github.com/Gujal00/ResolveURL/blob/master/script.module.resolveurl/lib/resolveurl/plugins/streamup.py */ -export class StreamUp extends Extractor { - public readonly id = 'streamup'; - - public readonly label = 'StreamUP'; - - public override readonly ttl: number = 10800000; // 3h - - public supports(_ctx: Context, url: URL): boolean { - return null !== url.host.match(/streamup|strmup/) || [ - 'vfaststream.com', - ].includes(url.host); - } - - protected async extractInternal(ctx: Context, url: URL, meta: Meta): Promise { - const headers = { Referer: `${url.origin}/`, Origin: url.origin }; - - const html = await this.fetcher.text(ctx, url, { headers }); - - const data = await this.fetcher.json(ctx, new URL(`/ajax/stream?filecode=${url.pathname.split('/').at(-1)}`, url), { headers }) as StreamUpApiData; - const playlistUrl = new URL(data.streaming_url); - - const $ = cheerio.load(html); - const title = $('title').text().trim(); - - return [ - { - url: playlistUrl, - format: Format.hls, - meta: { - ...meta, - height: meta.height ?? await guessHeightFromPlaylist(ctx, this.fetcher, playlistUrl), - title, - }, - }, - ]; - } -} diff --git a/src/extractor/__fixtures__/StreamUp/https:s3-hls2-cdn59.strmupcdn.comhlsSJbD5Zm1pj06jZ2LDbHa13YBmryxasmaster.m3u8token35f702a94c0e324d607d8761795a3788-1768016464-104.28.197.7-5ebad85b212e5e349b388501e051c992a2b68e70fdcaa6cc18270adee1f7c003 b/src/extractor/__fixtures__/StreamUp/https:s3-hls2-cdn59.strmupcdn.comhlsSJbD5Zm1pj06jZ2LDbHa13YBmryxasmaster.m3u8token35f702a94c0e324d607d8761795a3788-1768016464-104.28.197.7-5ebad85b212e5e349b388501e051c992a2b68e70fdcaa6cc18270adee1f7c003 deleted file mode 100644 index 508fb09..0000000 --- a/src/extractor/__fixtures__/StreamUp/https:s3-hls2-cdn59.strmupcdn.comhlsSJbD5Zm1pj06jZ2LDbHa13YBmryxasmaster.m3u8token35f702a94c0e324d607d8761795a3788-1768016464-104.28.197.7-5ebad85b212e5e349b388501e051c992a2b68e70fdcaa6cc18270adee1f7c003 +++ /dev/null @@ -1,4 +0,0 @@ -#EXTM3U -#EXT-X-VERSION:6 -#EXT-X-STREAM-INF:BANDWIDTH=1500000,AVERAGE-BANDWIDTH=1350000,CODECS="avc1.4d401f,mp4a.40.2",RESOLUTION=1920x1080,FRAME-RATE=30 -index_1920x1080.m3u8?token=35f702a94c0e324d607d8761795a3788-1768016464-104.28.197.7-5ebad85b212e5e349b388501e051c992a2b68e70fdcaa6cc18270adee1f7c003 diff --git a/src/extractor/__fixtures__/StreamUp/https:strmup.to6950ae79eaa4c b/src/extractor/__fixtures__/StreamUp/https:strmup.to6950ae79eaa4c deleted file mode 100644 index 20f2127..0000000 --- a/src/extractor/__fixtures__/StreamUp/https:strmup.to6950ae79eaa4c +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - Wake.Up.Dead.Man.A.Knives.Out.Mystery.2025 - - - - - - - - - -
-
-
- - - - - - - - - - - - - \ No newline at end of file diff --git a/src/extractor/__fixtures__/StreamUp/https:strmup.toajaxstreamfilecode6950ae79eaa4c b/src/extractor/__fixtures__/StreamUp/https:strmup.toajaxstreamfilecode6950ae79eaa4c deleted file mode 100644 index 7e9b3ee..0000000 --- a/src/extractor/__fixtures__/StreamUp/https:strmup.toajaxstreamfilecode6950ae79eaa4c +++ /dev/null @@ -1 +0,0 @@ -{"title":"","thumbnail":"https:\/\/add4.cdnup.cc\/thumbnail\/xWcziV3Qim\/6950ae79eaa4c.jpg","streaming_url":"https:\/\/s3-hls2-cdn59.strmupcdn.com\/hls\/SJbD5Zm1pj06jZ2LDbHa13YBmryxas\/master.m3u8?token=35f702a94c0e324d607d8761795a3788-1768016464-104.28.197.7-5ebad85b212e5e349b388501e051c992a2b68e70fdcaa6cc18270adee1f7c003","vast_ads":null,"filecode":"6950ae79eaa4c","subtitles":[{"id":521875,"status":1,"file_id":2229055,"type":0,"file_path":"https:\/\/add4.cdnup.cc\/subtitles\/QUKzfdu1n4\/PPTRdlsmJY94PKK_subtitle_0.vtt","language":"German \u2013 German (Forced)"},{"id":521876,"status":1,"file_id":2229055,"type":0,"file_path":"https:\/\/add4.cdnup.cc\/subtitles\/gxReoqgF82\/ABVuNSZeq61xYhM_subtitle_1.vtt","language":"German \u2013 German"},{"id":521877,"status":1,"file_id":2229055,"type":0,"file_path":"https:\/\/add4.cdnup.cc\/subtitles\/YSzO4RQUAu\/DNRW2kgCksC8YYq_subtitle_2.vtt","language":"German \u2013 German"},{"id":521878,"status":1,"file_id":2229055,"type":0,"file_path":"https:\/\/add4.cdnup.cc\/subtitles\/l7MtB81Fsb\/DSFucpIAjME1ZdV_subtitle_3.vtt","language":"German \u2013 German (SDH)"}],"default_sub_lang":"German"} \ No newline at end of file diff --git a/src/extractor/__snapshots__/StreamUp.test.ts.snap b/src/extractor/__snapshots__/StreamUp.test.ts.snap deleted file mode 100644 index dccda17..0000000 --- a/src/extractor/__snapshots__/StreamUp.test.ts.snap +++ /dev/null @@ -1,17 +0,0 @@ -// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing - -exports[`StreamUp handle one battle after another 1`] = ` -[ - { - "format": "hls", - "label": "StreamUP", - "meta": { - "extractorId": "streamup", - "height": 1080, - "title": "Wake.Up.Dead.Man.A.Knives.Out.Mystery.2025", - }, - "ttl": 10800000, - "url": "https://s3-hls2-cdn59.strmupcdn.com/hls/SJbD5Zm1pj06jZ2LDbHa13YBmryxas/master.m3u8?token=35f702a94c0e324d607d8761795a3788-1768016464-104.28.197.7-5ebad85b212e5e349b388501e051c992a2b68e70fdcaa6cc18270adee1f7c003", - }, -] -`; diff --git a/src/extractor/index.ts b/src/extractor/index.ts index cfe91ac..8946702 100644 --- a/src/extractor/index.ts +++ b/src/extractor/index.ts @@ -16,7 +16,6 @@ import { RgShows } from './RgShows'; import { SaveFiles } from './SaveFiles'; import { StreamEmbed } from './StreamEmbed'; import { Streamtape } from './Streamtape'; -import { StreamUp } from './StreamUp'; import { SuperVideo } from './SuperVideo'; import { Uqload } from './Uqload'; import { Vidora } from './Vidora'; @@ -49,7 +48,6 @@ export const createExtractors = (fetcher: Fetcher): Extractor[] => { new SaveFiles(fetcher), new StreamEmbed(fetcher), new Streamtape(fetcher), - new StreamUp(fetcher), new SuperVideo(fetcher), new Uqload(fetcher), new Vidora(fetcher),