Skip to content

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.

fixed docs and logs.

Petr Patek2ad497d83639
diff --git a/src/session_pool/session.js b/src/session_pool/session.js
index dcd4e3edf..8a91d57fc 100644
--- a/src/session_pool/session.js
+++ b/src/session_pool/session.js
@@ -19,6 +19,8 @@ export class Session {
* @param options.userData {Object} - Object where custom user data can be stored. For example custom headers.
* @param options.maxErrorScore {number} - Maximum number of marking session as blocked usage.
* If the `errorScore` reaches the `maxErrorScore` session is marked as block and it is thrown away.
+ * It starts at 0. Calling the `markBad` function increases the `errorScore` by 1.
+ * Calling the `markGood` will decrease the `errorScore` by `errorScoreDecrement`
* @param options.errorScoreDecrement {number} - It is used for healing the session.
* For example: if your session is marked bad two times, but it is successful on the third attempt it's errorScore is decremented by this number.
* @param options.createdAt {Date} - Date of creation.
diff --git a/src/session_pool/session_pool.js b/src/session_pool/session_pool.js
index 3bfe1028a..e57992e07 100644
--- a/src/session_pool/session_pool.js
+++ b/src/session_pool/session_pool.js
@@ -304,8 +304,7 @@ export class SessionPool extends EventEmitter {
}
}
- log.debug(`SessionPool: Loaded ${this.sessions.length} Sessions from KeyValueStore`);
- log.debug(`SessionPool: Active sessions ${this.usableSessionsCount} Sessions from KeyValueStore`);
+ log.debug(`SessionPool: ${this.usableSessionsCount} active sessions loaded from KeyValueStore`);
}
}