mirror of
https://github.com/sussy-code/providers.git
synced 2026-03-11 17:55:37 +00:00
Streamtape scraper
This commit is contained in:
parent
c8f32145fc
commit
8063c5f245
2 changed files with 38 additions and 0 deletions
|
|
@ -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<Embed> {
|
|||
doodScraper,
|
||||
streamvidScraper,
|
||||
voeScraper,
|
||||
streamtapeScraper,
|
||||
];
|
||||
}
|
||||
|
|
|
|||
36
src/providers/embeds/streamtape.ts
Normal file
36
src/providers/embeds/streamtape.ts
Normal 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,
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
});
|
||||
Loading…
Reference in a new issue