Skip to content

Supercharge your AI agents with data from the web and beyond. Building the library for superintelligence. 🔥

Update index.ts

Eric Ciarla65d63bae4554
diff --git a/apps/api/src/scraper/WebScraper/index.ts b/apps/api/src/scraper/WebScraper/index.ts
index dfb52c476..e8ce813bd 100644
--- a/apps/api/src/scraper/WebScraper/index.ts
+++ b/apps/api/src/scraper/WebScraper/index.ts
@@ -163,9 +163,12 @@ export class WebScraperDataProvider {
inProgress?: (progress: Progress) => void
): 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 crawler = new WebCrawler({
initialUrl: this.urls[0],
includes: this.includes,