fix(crawler): check for more strings

This commit is contained in:
Gergő Móricz 2025-03-05 18:48:05 +01:00
parent 4902d0ac64
commit c22c87ab0a

View File

@ -179,7 +179,7 @@ export class WebCrawler {
const isAllowed = this.ignoreRobotsTxt
? true
: (this.robots.isAllowed(link, "FireCrawlAgent") ?? true);
: ((this.robots.isAllowed(link, "FireCrawlAgent") || this.robots.isAllowed(link, "FirecrawlAgent")) ?? true);
// Check if the link is disallowed by robots.txt
if (!isAllowed) {
this.logger.debug(`Link disallowed by robots.txt: ${link}`, {
@ -453,7 +453,7 @@ export class WebCrawler {
return ignoreRobotsTxt
? true
: this.robots
? (this.robots.isAllowed(url, "FireCrawlAgent") ?? true)
? ((this.robots.isAllowed(url, "FireCrawlAgent") || this.robots.isAllowed(url, "FirecrawlAgent")) ?? true)
: true;
}