mirror of
https://git.mirrors.martin98.com/https://github.com/mendableai/firecrawl
synced 2025-08-14 18:55:59 +08:00
added iframe links to extractLinksFromHTML
This commit is contained in:
parent
fe02101a12
commit
367af9512f
@ -333,6 +333,16 @@ export class WebCrawler {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Extract links from iframes with inline src
|
||||||
|
$("iframe").each((_, element) => {
|
||||||
|
const src = $(element).attr("src");
|
||||||
|
if (src && src.startsWith("data:text/html")) {
|
||||||
|
const iframeHtml = decodeURIComponent(src.split(",")[1]);
|
||||||
|
const iframeLinks = this.extractLinksFromHTML(iframeHtml, url);
|
||||||
|
links = links.concat(iframeLinks);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
return links;
|
return links;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user