diff --git a/src/providers/all.ts b/src/providers/all.ts index b98ab6f..d20e14b 100644 --- a/src/providers/all.ts +++ b/src/providers/all.ts @@ -23,6 +23,7 @@ import { fileMoonScraper } from './embeds/filemoon'; import { ridooScraper } from './embeds/ridoo'; import { smashyStreamDScraper } from './embeds/smashystream/dued'; import { smashyStreamFScraper } from './embeds/smashystream/video1'; +import { streamtapeScraper } from './embeds/streamtape'; import { streamvidScraper } from './embeds/streamvid'; import { vidCloudScraper } from './embeds/vidcloud'; import { vidplayScraper } from './embeds/vidplay'; @@ -80,5 +81,6 @@ export function gatherAllEmbeds(): Array { doodScraper, streamvidScraper, voeScraper, + streamtapeScraper, ]; } diff --git a/src/providers/embeds/streamtape.ts b/src/providers/embeds/streamtape.ts new file mode 100644 index 0000000..0023ec7 --- /dev/null +++ b/src/providers/embeds/streamtape.ts @@ -0,0 +1,36 @@ +import { flags } from '@/entrypoint/utils/targets'; +import { makeEmbed } from '@/providers/base'; + +export const streamtapeScraper = makeEmbed({ + id: 'streamtape', + name: 'streamtape', + rank: 160, + async scrape(ctx) { + const embed = await ctx.proxiedFetcher(ctx.url); + + const match = embed.match(/robotlink'\).innerHTML = (.*)'/); + if (!match) throw new Error('No match found'); + + const [fh, sh] = match?.[1]?.split("+ ('") ?? []; + if (!fh || !sh) throw new Error('No match found'); + + const url = `https:${fh?.replace(/'/g, '').trim()}${sh?.substring(3).trim()}`; + + return { + stream: [ + { + id: 'primary', + type: 'file', + flags: [flags.CORS_ALLOWED, flags.IP_LOCKED], + captions: [], + qualities: { + '1080': { + type: 'mp4', + url, + }, + }, + }, + ], + }; + }, +});