From 5e8aa927881062896ec651e5324a1178a901c84b Mon Sep 17 00:00:00 2001 From: Eric Ciarla Date: Thu, 13 Jun 2024 17:33:13 -0400 Subject: [PATCH] Update index.ts --- apps/api/src/scraper/WebScraper/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/api/src/scraper/WebScraper/index.ts b/apps/api/src/scraper/WebScraper/index.ts index e8ce813..ef0c839 100644 --- a/apps/api/src/scraper/WebScraper/index.ts +++ b/apps/api/src/scraper/WebScraper/index.ts @@ -163,7 +163,7 @@ export class WebScraperDataProvider { inProgress?: (progress: Progress) => void ): Promise { - const baseURLDepth = new URL(this.urls[0]).pathname.split('/').length - 2; + const baseURLDepth = new URL(this.urls[0]).pathname.split('/').length - 1; const adjustedMaxDepth = this.maxCrawledDepth + baseURLDepth;