mirror of
https://github.com/mendableai/firecrawl.git
synced 2024-11-16 03:32:22 +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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user