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
Add statistics logMessage to BasicCrawler
Ondra Urban08b9e78cabd7
diff --git a/src/crawlers/basic_crawler.js b/src/crawlers/basic_crawler.jsindex 4da49881c..ab473a39c 100644--- a/src/crawlers/basic_crawler.js+++ b/src/crawlers/basic_crawler.js@@ -193,7 +193,7 @@ class BasicCrawler {this.handleFailedRequestFunction = handleFailedRequestFunction;this.maxRequestRetries = maxRequestRetries;this.handledRequestsCount = 0;- this.stats = new Statistics();+ this.stats = new Statistics({ logMessage: 'Crawler request statistics:' });let shouldLogMaxPagesExceeded = true;const isMaxPagesExceeded = () => maxRequestsPerCrawl && maxRequestsPerCrawl <= this.handledRequestsCount;