mirror of
https://github.com/movie-web/providers.git
synced 2025-09-13 17:53:24 +00:00
fix filemoon
This commit is contained in:
12620
package-lock.json
generated
Normal file
12620
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,3 +1,4 @@
|
|||||||
|
import { load } from 'cheerio';
|
||||||
import { unpack } from 'unpacker';
|
import { unpack } from 'unpacker';
|
||||||
|
|
||||||
import { flags } from '@/entrypoint/utils/targets';
|
import { flags } from '@/entrypoint/utils/targets';
|
||||||
@@ -19,7 +20,8 @@ export const fileMoonScraper = makeEmbed({
|
|||||||
referer: ctx.url,
|
referer: ctx.url,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
const evalCode = embedRes.match(evalCodeRegex);
|
const embedHtml = load(embedRes);
|
||||||
|
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[1]);
|
||||||
const file = fileRegex.exec(unpacked);
|
const file = fileRegex.exec(unpacked);
|
||||||
|
Reference in New Issue
Block a user