mirror of
https://github.com/movie-web/providers.git
synced 2025-09-13 17:53:24 +00:00
Add streamvid + voe
This commit is contained in:
@@ -23,8 +23,10 @@ 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 { streamvidScraper } from './embeds/streamvid';
|
||||||
import { vidCloudScraper } from './embeds/vidcloud';
|
import { vidCloudScraper } from './embeds/vidcloud';
|
||||||
import { vidplayScraper } from './embeds/vidplay';
|
import { vidplayScraper } from './embeds/vidplay';
|
||||||
|
import { voeScraper } from './embeds/voe';
|
||||||
import { wootlyScraper } from './embeds/wootly';
|
import { wootlyScraper } from './embeds/wootly';
|
||||||
import { goojaraScraper } from './sources/goojara';
|
import { goojaraScraper } from './sources/goojara';
|
||||||
import { hdRezkaScraper } from './sources/hdrezka';
|
import { hdRezkaScraper } from './sources/hdrezka';
|
||||||
@@ -76,5 +78,7 @@ export function gatherAllEmbeds(): Array<Embed> {
|
|||||||
vidplayScraper,
|
vidplayScraper,
|
||||||
wootlyScraper,
|
wootlyScraper,
|
||||||
doodScraper,
|
doodScraper,
|
||||||
|
streamvidScraper,
|
||||||
|
voeScraper,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
36
src/providers/embeds/streamvid.ts
Normal file
36
src/providers/embeds/streamvid.ts
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
import * as unpacker from 'unpacker';
|
||||||
|
|
||||||
|
import { flags } from '@/entrypoint/utils/targets';
|
||||||
|
import { makeEmbed } from '@/providers/base';
|
||||||
|
|
||||||
|
const packedRegex = /(eval\(function\(p,a,c,k,e,d\).*\)\)\))/;
|
||||||
|
const linkRegex = /src:"(https:\/\/[^"]+)"/;
|
||||||
|
|
||||||
|
export const streamvidScraper = makeEmbed({
|
||||||
|
id: 'streamvid',
|
||||||
|
name: 'Streamvid',
|
||||||
|
rank: 215,
|
||||||
|
async scrape(ctx) {
|
||||||
|
// Example url: https://streamvid.net/fu1jaf96vofx
|
||||||
|
const streamRes = await ctx.proxiedFetcher<string>(ctx.url);
|
||||||
|
const packed = streamRes.match(packedRegex);
|
||||||
|
|
||||||
|
if (!packed) throw new Error('streamvid packed not found');
|
||||||
|
|
||||||
|
const unpacked = unpacker.unpack(packed[1]);
|
||||||
|
const link = unpacked.match(linkRegex);
|
||||||
|
|
||||||
|
if (!link) throw new Error('streamvid link not found');
|
||||||
|
return {
|
||||||
|
stream: [
|
||||||
|
{
|
||||||
|
type: 'hls',
|
||||||
|
id: 'primary',
|
||||||
|
playlist: link[1],
|
||||||
|
flags: [flags.CORS_ALLOWED],
|
||||||
|
captions: [],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
});
|
30
src/providers/embeds/voe.ts
Normal file
30
src/providers/embeds/voe.ts
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
import { flags } from '@/entrypoint/utils/targets';
|
||||||
|
import { makeEmbed } from '@/providers/base';
|
||||||
|
|
||||||
|
const linkRegex = /'hls': ?'(http.*?)',/;
|
||||||
|
|
||||||
|
export const voeScraper = makeEmbed({
|
||||||
|
id: 'voe',
|
||||||
|
name: 'voe.sx',
|
||||||
|
rank: 180,
|
||||||
|
async scrape(ctx) {
|
||||||
|
const embed = await ctx.proxiedFetcher<string>(ctx.url);
|
||||||
|
|
||||||
|
const playerSrc = embed.match(linkRegex) ?? [];
|
||||||
|
|
||||||
|
const streamUrl = playerSrc[1];
|
||||||
|
if (!streamUrl) throw new Error('Stream url not found in embed code');
|
||||||
|
|
||||||
|
return {
|
||||||
|
stream: [
|
||||||
|
{
|
||||||
|
type: 'hls',
|
||||||
|
id: 'primary',
|
||||||
|
playlist: streamUrl,
|
||||||
|
flags: [flags.CORS_ALLOWED],
|
||||||
|
captions: [],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
});
|
Reference in New Issue
Block a user