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: use 0 (number) instead of false as default for sessionRotationCount (#2372)
Jan Buchar667a3e7a2be3
diff --git a/packages/core/src/request.ts b/packages/core/src/request.tsindex ba7bfaeec..6718c6bae 100644--- a/packages/core/src/request.ts+++ b/packages/core/src/request.ts@@ -271,7 +271,7 @@ export class Request<UserData extends Dictionary = Dictionary> {/** Indicates the number of times the crawling of the request has rotated the session due to a session or a proxy error. */get sessionRotationCount(): number {- return this.userData.__crawlee?.sessionRotationCount ?? false;+ return this.userData.__crawlee?.sessionRotationCount ?? 0;}/** Indicates the number of times the crawling of the request has rotated the session due to a session or a proxy error. */