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
Logging failed requests in basic crawler - #fixes #46 (#58)
Marek Trunkátf60571569d19
diff --git a/src/basic_crawler.js b/src/basic_crawler.jsindex 3d0388a10..d23e1b1e3 100644--- a/src/basic_crawler.js+++ b/src/basic_crawler.js@@ -179,10 +179,19 @@ export default class BasicCrawler {// Retry request.if (request.retryCount < this.maxRequestRetries) {request.retryCount++;+ log.exception(error, 'Reclaiming failed request back to queue', {+ url: request.url,+ retryCount: request.retryCount,+ });return source.reclaimRequest(request);}+ log.exception(error, 'Marking failed request handled', {+ url: request.url,+ retryCount: request.retryCount,+ });+// Mark as failed.return source.markRequestHandled(request)