mirror of
https://github.com/movie-web/providers.git
synced 2025-09-13 15:33:26 +00:00
return thumbnailTracks and add ip-locked flag to mixdrop
This commit is contained in:
@@ -25,6 +25,7 @@ export const doodScraper = makeEmbed({
|
|||||||
|
|
||||||
const dataForLater = doodData.match(/\?token=([^&]+)&expiry=/)?.[1];
|
const dataForLater = doodData.match(/\?token=([^&]+)&expiry=/)?.[1];
|
||||||
const path = doodData.match(/\$\.get\('\/pass_md5([^']+)/)?.[1];
|
const path = doodData.match(/\$\.get\('\/pass_md5([^']+)/)?.[1];
|
||||||
|
const thumbnailTrack = doodData.match(/thumbnails:\s\{\s*vtt:\s'([^']*)'/);
|
||||||
|
|
||||||
const doodPage = await ctx.proxiedFetcher<string>(`/pass_md5${path}`, {
|
const doodPage = await ctx.proxiedFetcher<string>(`/pass_md5${path}`, {
|
||||||
headers: {
|
headers: {
|
||||||
@@ -53,6 +54,14 @@ export const doodScraper = makeEmbed({
|
|||||||
headers: {
|
headers: {
|
||||||
Referer: baseUrl,
|
Referer: baseUrl,
|
||||||
},
|
},
|
||||||
|
...(thumbnailTrack
|
||||||
|
? {
|
||||||
|
thumbnailTrack: {
|
||||||
|
type: 'vtt',
|
||||||
|
url: `https:${thumbnailTrack[1]}`,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
: {}),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
@@ -1,5 +1,6 @@
|
|||||||
import * as unpacker from 'unpacker';
|
import * as unpacker from 'unpacker';
|
||||||
|
|
||||||
|
import { flags } from '@/entrypoint/utils/targets';
|
||||||
import { makeEmbed } from '@/providers/base';
|
import { makeEmbed } from '@/providers/base';
|
||||||
|
|
||||||
const mixdropBase = 'https://mixdrop.ag';
|
const mixdropBase = 'https://mixdrop.ag';
|
||||||
@@ -47,7 +48,7 @@ export const mixdropScraper = makeEmbed({
|
|||||||
{
|
{
|
||||||
id: 'primary',
|
id: 'primary',
|
||||||
type: 'file',
|
type: 'file',
|
||||||
flags: [],
|
flags: [flags.IP_LOCKED],
|
||||||
captions: [],
|
captions: [],
|
||||||
qualities: {
|
qualities: {
|
||||||
unknown: {
|
unknown: {
|
||||||
|
@@ -2,15 +2,18 @@ import { flags } from '@/entrypoint/utils/targets';
|
|||||||
import { makeEmbed } from '@/providers/base';
|
import { makeEmbed } from '@/providers/base';
|
||||||
|
|
||||||
const linkRegex = /'hls': ?'(http.*?)',/;
|
const linkRegex = /'hls': ?'(http.*?)',/;
|
||||||
|
const tracksRegex = /previewThumbnails:\s{.*src:\["([^"]+)"]/;
|
||||||
|
|
||||||
export const voeScraper = makeEmbed({
|
export const voeScraper = makeEmbed({
|
||||||
id: 'voe',
|
id: 'voe',
|
||||||
name: 'voe.sx',
|
name: 'voe.sx',
|
||||||
rank: 180,
|
rank: 180,
|
||||||
async scrape(ctx) {
|
async scrape(ctx) {
|
||||||
const embed = await ctx.proxiedFetcher<string>(ctx.url);
|
const embedRes = await ctx.proxiedFetcher.full<string>(ctx.url);
|
||||||
|
const embed = embedRes.body;
|
||||||
|
|
||||||
const playerSrc = embed.match(linkRegex) ?? [];
|
const playerSrc = embed.match(linkRegex) ?? [];
|
||||||
|
const thumbnailTrack = embed.match(tracksRegex);
|
||||||
|
|
||||||
const streamUrl = playerSrc[1];
|
const streamUrl = playerSrc[1];
|
||||||
if (!streamUrl) throw new Error('Stream url not found in embed code');
|
if (!streamUrl) throw new Error('Stream url not found in embed code');
|
||||||
@@ -21,11 +24,19 @@ export const voeScraper = makeEmbed({
|
|||||||
type: 'hls',
|
type: 'hls',
|
||||||
id: 'primary',
|
id: 'primary',
|
||||||
playlist: streamUrl,
|
playlist: streamUrl,
|
||||||
flags: [flags.CORS_ALLOWED],
|
flags: [flags.CORS_ALLOWED, flags.IP_LOCKED],
|
||||||
captions: [],
|
captions: [],
|
||||||
headers: {
|
headers: {
|
||||||
Referer: 'https://voe.sx',
|
Referer: 'https://voe.sx',
|
||||||
},
|
},
|
||||||
|
...(thumbnailTrack
|
||||||
|
? {
|
||||||
|
thumbnailTrack: {
|
||||||
|
type: 'vtt',
|
||||||
|
url: new URL(embedRes.finalUrl).origin + thumbnailTrack[1],
|
||||||
|
},
|
||||||
|
}
|
||||||
|
: {}),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user