This commit is contained in:
GSTAR 2025-12-20 07:19:24 +01:00 committed by GitHub
commit 1d4a7713c3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -57,9 +57,10 @@ export class FileMoon extends Extractor {
const $ = cheerio.load(html);
const title = $('h3').text().trim();
const iframeUrlMatch = html.match(/iframe.*?src=["'](.*?)["']/);
if (iframeUrlMatch && iframeUrlMatch[1]) {
return await this.extractInternal(ctx, new URL(iframeUrlMatch[1]), { title, ...meta }, url);
const iframeUrlMatches = Array.from(html.matchAll(/iframe.*?src=["'](.*?)["']/g));
if (iframeUrlMatches.length) {
// Use last match because there can be fake adblock catcher urls before
return await this.extractInternal(ctx, new URL((iframeUrlMatches[iframeUrlMatches.length - 1] as RegExpExecArray)[1] as string), { title, ...meta }, url);
}
const playlistUrl = await buildMediaFlowProxyExtractorStreamUrl(ctx, this.fetcher, 'FileMoon', originalUrl as URL, headers);