mirror of
https://github.com/mendableai/firecrawl.git
synced 2024-11-16 11:42:24 +08:00
Merge pull request #449 from mendableai/bugfix/malformed-url-sitemap
Added regex for links in sitemap
This commit is contained in:
commit
2c1221750b
|
@ -64,7 +64,7 @@ export class WebCrawler {
|
|||
private filterLinks(sitemapLinks: string[], limit: number, maxDepth: number): string[] {
|
||||
return sitemapLinks
|
||||
.filter((link) => {
|
||||
const url = new URL(link);
|
||||
const url = new URL(link.trim(), this.baseUrl);
|
||||
const path = url.pathname;
|
||||
|
||||
const depth = getURLDepth(url.toString());
|
||||
|
|
Loading…
Reference in New Issue
Block a user