filemoon fix

This commit is contained in:
Jorrin 2024-04-03 17:30:01 +02:00
parent 464f34d574
commit d25e1eaede
3 changed files with 4 additions and 6 deletions

View File

@ -23,7 +23,7 @@ export const fileMoonScraper = makeEmbed({
const embedHtml = load(embedRes); const embedHtml = load(embedRes);
const evalCode = embedHtml('script').text().match(evalCodeRegex); const evalCode = embedHtml('script').text().match(evalCodeRegex);
if (!evalCode) throw new Error('Failed to find eval code'); if (!evalCode) throw new Error('Failed to find eval code');
const unpacked = unpack(evalCode[1]); const unpacked = unpack(evalCode[0]);
const file = fileRegex.exec(unpacked); const file = fileRegex.exec(unpacked);
if (!file?.[1]) throw new Error('Failed to find file'); if (!file?.[1]) throw new Error('Failed to find file');
@ -53,7 +53,7 @@ export const fileMoonScraper = makeEmbed({
id: 'primary', id: 'primary',
type: 'hls', type: 'hls',
playlist: file[1], playlist: file[1],
flags: [flags.CORS_ALLOWED], flags: [],
captions, captions,
}, },
], ],

View File

@ -1,4 +1,3 @@
import { flags } from '@/entrypoint/utils/targets';
import { makeEmbed } from '@/providers/base'; import { makeEmbed } from '@/providers/base';
import { Caption, getCaptionTypeFromUrl, labelToLanguageCode } from '@/providers/captions'; import { Caption, getCaptionTypeFromUrl, labelToLanguageCode } from '@/providers/captions';
@ -54,7 +53,7 @@ export const vidplayScraper = makeEmbed({
id: 'primary', id: 'primary',
type: 'hls', type: 'hls',
playlist: source, playlist: source,
flags: [flags.IP_LOCKED], flags: [],
headers: { headers: {
Referer: url.origin, Referer: url.origin,
Origin: url.origin, Origin: url.origin,

View File

@ -1,6 +1,5 @@
import { load } from 'cheerio'; import { load } from 'cheerio';
import { flags } from '@/entrypoint/utils/targets';
import { SourcererEmbed, SourcererOutput, makeSourcerer } from '@/providers/base'; import { SourcererEmbed, SourcererOutput, makeSourcerer } from '@/providers/base';
import { MovieScrapeContext, ShowScrapeContext } from '@/utils/context'; import { MovieScrapeContext, ShowScrapeContext } from '@/utils/context';
@ -78,6 +77,6 @@ export const vidSrcToScraper = makeSourcerer({
name: 'VidSrcTo', name: 'VidSrcTo',
scrapeMovie: universalScraper, scrapeMovie: universalScraper,
scrapeShow: universalScraper, scrapeShow: universalScraper,
flags: [flags.IP_LOCKED], flags: [],
rank: 130, rank: 130,
}); });