Streamtape scraper

This commit is contained in:
2024-03-28 00:07:43 -05:00
parent c8f32145fc
commit 8063c5f245
2 changed files with 38 additions and 0 deletions

View File

@@ -23,6 +23,7 @@ import { fileMoonScraper } from './embeds/filemoon';
import { ridooScraper } from './embeds/ridoo'; import { ridooScraper } from './embeds/ridoo';
import { smashyStreamDScraper } from './embeds/smashystream/dued'; import { smashyStreamDScraper } from './embeds/smashystream/dued';
import { smashyStreamFScraper } from './embeds/smashystream/video1'; import { smashyStreamFScraper } from './embeds/smashystream/video1';
import { streamtapeScraper } from './embeds/streamtape';
import { streamvidScraper } from './embeds/streamvid'; import { streamvidScraper } from './embeds/streamvid';
import { vidCloudScraper } from './embeds/vidcloud'; import { vidCloudScraper } from './embeds/vidcloud';
import { vidplayScraper } from './embeds/vidplay'; import { vidplayScraper } from './embeds/vidplay';
@@ -80,5 +81,6 @@ export function gatherAllEmbeds(): Array<Embed> {
doodScraper, doodScraper,
streamvidScraper, streamvidScraper,
voeScraper, voeScraper,
streamtapeScraper,
]; ];
} }

View File

@@ -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<string>(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,
},
},
},
],
};
},
});