Crawlee—A web scraping and browser automation library for Node.js to build reliable crawlers. In JavaScript and TypeScript. Extract data for AI, LLMs, RAG, or GPTs. Download HTML, PDF, JPG, PNG, and other files from websites. Works with Puppeteer, Playwright, Cheerio, JSDOM, and raw HTTP. Both headful and headless mode. With proxy rotation.
TypeScript apifyautomationcrawlercrawlingheadlessheadless-chromejavascriptnodejsnpmplaywrightpuppeteerscraperscrapingtypescriptweb-crawlerweb-crawlingweb-scraping
fix: don't call `notify` in `addRequests()` (#2425)
Jindřich Bärc4d544691206
diff --git a/packages/basic-crawler/src/internals/basic-crawler.ts b/packages/basic-crawler/src/internals/basic-crawler.tsindex 57a6ec1a9..2a00b012a 100644--- a/packages/basic-crawler/src/internals/basic-crawler.ts+++ b/packages/basic-crawler/src/internals/basic-crawler.ts@@ -950,14 +950,7 @@ export class BasicCrawler<Context extends CrawlingContext = BasicCrawlingContext*/async addRequests(requests: (string | Source)[], options: CrawlerAddRequestsOptions = {}): Promise<CrawlerAddRequestsResult> {const requestQueue = await this.getRequestQueue();- const res = await requestQueue.addRequestsBatched(requests, options);-- // Notify AutoscaledPool, if it exists, the method is called after the crawler started, and we don't want to wait- // this is important for crawlers in `keepAlive` mode that might have an empty queue and we don't want to wait till- // the next scheduled check (which might come in as much as 500ms by default).- await this.autoscaledPool?.notify();-- return res;+ return requestQueue.addRequestsBatched(requests, options);}/**