mirror of
https://github.com/mendableai/firecrawl.git
synced 2024-11-16 03:32:22 +08:00
fix(crawler): make sure includes/excludes is an array
This commit is contained in:
parent
508568f943
commit
fbbc3878f1
|
@ -53,8 +53,8 @@ export class WebCrawler {
|
|||
this.jobId = jobId;
|
||||
this.initialUrl = initialUrl;
|
||||
this.baseUrl = new URL(initialUrl).origin;
|
||||
this.includes = includes ?? [];
|
||||
this.excludes = excludes ?? [];
|
||||
this.includes = Array.isArray(includes) ? includes : [];
|
||||
this.excludes = Array.isArray(excludes) ? excludes : [];
|
||||
this.limit = limit;
|
||||
this.robotsTxtUrl = `${this.baseUrl}/robots.txt`;
|
||||
this.robots = robotsParser(this.robotsTxtUrl, "");
|
||||
|
|
Loading…
Reference in New Issue
Block a user