From 6eb28c8b0f6bab0a537e41a0a431afb1f85306a8 Mon Sep 17 00:00:00 2001 From: GSTAR <44748406+GLlgGL@users.noreply.github.com> Date: Thu, 6 Nov 2025 20:36:54 +0100 Subject: [PATCH] Update Streamtape.ts --- src/extractor/Streamtape.ts | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/src/extractor/Streamtape.ts b/src/extractor/Streamtape.ts index c8994d6..813ec21 100644 --- a/src/extractor/Streamtape.ts +++ b/src/extractor/Streamtape.ts @@ -9,11 +9,22 @@ import { Extractor } from './Extractor'; export class Streamtape extends Extractor { public readonly id = 'streamtape'; + public readonly label = 'Streamtape(MFP)'; - public readonly label = 'Streamtape (via MediaFlow Proxy)'; + // ✅ Add the domains list here + public readonly domains = [ + 'streamtape.com', 'strtape.cloud', 'streamtape.net', 'streamta.pe', 'streamtape.site', + 'strcloud.link', 'strcloud.club', 'strtpe.link', 'streamtape.cc', 'scloud.online', 'stape.fun', + 'streamadblockplus.com', 'shavetape.cash', 'streamtape.to', 'streamta.site', + 'streamadblocker.xyz', 'tapewithadblock.org', 'adblocktape.wiki', 'antiadtape.com', + 'streamtape.xyz', 'tapeblocker.com', 'streamnoads.com', 'tapeadvertisement.com', + 'tapeadsenjoyer.com', 'watchadsontape.com' + ]; public supports(ctx: Context, url: URL): boolean { - return null !== url.host.match(/streamtape/) && supportsMediaFlowProxy(ctx); + // ✅ Match any of the known domains dynamically + const isSupportedDomain = this.domains.some(domain => url.hostname.endsWith(domain)); + return isSupportedDomain && supportsMediaFlowProxy(ctx); } public override normalize(url: URL): URL { @@ -29,7 +40,6 @@ export class Streamtape extends Extractor { const html = await this.fetcher.text(ctx, url, { headers }); const sizeMatch = html.match(/([\d.]+ ?[GM]B)/) as string[]; - const $ = cheerio.load(html); const title = $('meta[name="og:title"]').attr('content') as string; @@ -43,9 +53,9 @@ export class Streamtape extends Extractor { meta: { ...meta, title, - bytes: bytes.parse(sizeMatch[1] as string) as number, + bytes: bytes.parse(sizeMatch?.[1] ?? '0') as number, }, }, ]; }; -} +} \ No newline at end of file