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.

Fix session debug logging

Ondra Urban06a7338c5eac
diff --git a/src/session_pool/session_pool.js b/src/session_pool/session_pool.js
index 09f374164..88b5c555e 100644
--- a/src/session_pool/session_pool.js
+++ b/src/session_pool/session_pool.js
@@ -234,7 +234,7 @@ export class SessionPool extends EventEmitter {
_removeSession(session) {
const sessionIndex = this.sessions.findIndex(storedSession => storedSession.id === session.id);
- const removedSession = this.sessions.splice(sessionIndex, 1);
+ const [removedSession] = this.sessions.splice(sessionIndex, 1);
this.log.debug(`Removed Session - ${removedSession.id}`);
}