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.jobId = jobId;
|
||||||
this.initialUrl = initialUrl;
|
this.initialUrl = initialUrl;
|
||||||
this.baseUrl = new URL(initialUrl).origin;
|
this.baseUrl = new URL(initialUrl).origin;
|
||||||
this.includes = includes ?? [];
|
this.includes = Array.isArray(includes) ? includes : [];
|
||||||
this.excludes = excludes ?? [];
|
this.excludes = Array.isArray(excludes) ? excludes : [];
|
||||||
this.limit = limit;
|
this.limit = limit;
|
||||||
this.robotsTxtUrl = `${this.baseUrl}/robots.txt`;
|
this.robotsTxtUrl = `${this.baseUrl}/robots.txt`;
|
||||||
this.robots = robotsParser(this.robotsTxtUrl, "");
|
this.robots = robotsParser(this.robotsTxtUrl, "");
|
||||||
|
|
Loading…
Reference in New Issue
Block a user