Update index.ts
This commit is contained in:
parent
32e814bedc
commit
65d63bae45
@ -163,9 +163,12 @@ export class WebScraperDataProvider {
|
|||||||
inProgress?: (progress: Progress) => void
|
inProgress?: (progress: Progress) => void
|
||||||
): Promise<Document[]> {
|
): Promise<Document[]> {
|
||||||
|
|
||||||
const baseURLDepth = new URL(this.urls[0]).pathname.split('/').length - 1;
|
const baseURLDepth = new URL(this.urls[0]).pathname.split('/').length - 2;
|
||||||
const adjustedMaxDepth = this.maxCrawledDepth + baseURLDepth;
|
const adjustedMaxDepth = this.maxCrawledDepth + baseURLDepth;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const crawler = new WebCrawler({
|
const crawler = new WebCrawler({
|
||||||
initialUrl: this.urls[0],
|
initialUrl: this.urls[0],
|
||||||
includes: this.includes,
|
includes: this.includes,
|
||||||
|
Loading…
Reference in New Issue
Block a user