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.

builded docs.

Petr Patek3583b56423a5
diff --git a/docs/api/Session.md b/docs/api/Session.md
index 81e8b1dcf..b198fcd98 100644
--- a/docs/api/Session.md
+++ b/docs/api/Session.md
@@ -57,7 +57,9 @@ Session configuration.
</tr>
<tr>
<td colspan="3"><p>Maximum number of marking session as blocked usage.
-If the <code>errorScore</code> reaches the <code>maxErrorScore</code> session is marked as block and it is thrown away.</p>
+If the <code>errorScore</code> reaches the <code>maxErrorScore</code> session is marked as block and it is thrown away.
+It starts at 0. Calling the <code>markBad</code> function increases the <code>errorScore</code> by 1.
+Calling the <code>markGood</code> will decrease the <code>errorScore</code> by <code>errorScoreDecrement</code></p>
</td></tr><tr>
<td><code>options.errorScoreDecrement</code></td><td><code>number</code></td>
</tr>
diff --git a/docs/api/SessionPool.md b/docs/api/SessionPool.md
index 7c5c5246c..8a60f7c54 100644
--- a/docs/api/SessionPool.md
+++ b/docs/api/SessionPool.md
@@ -54,6 +54,7 @@ session3.retire();
- [`.getSession()`](#SessionPool+getSession) ⇒ [`Promise<Session>`](session)
- [`.getState()`](#SessionPool+getState) ⇒ `Object`
- [`.persistState()`](#SessionPool+persistState) ⇒ `Promise`
+ - [`.teardown()`](#SessionPool+teardown)
<a name="new_SessionPool_new"></a>
@@ -145,3 +146,9 @@ Returns an object representing the internal state of the `SessionPool` instance.
Persists the current state of the `SessionPool` into the default [`KeyValueStore`](keyvaluestore). The state is persisted automatically in regular
intervals.
+
+<a name="SessionPool+teardown"></a>
+
+## `sessionPool.teardown()`
+
+Removes listener from `persistState` event. This function should be called after you are done with using the `SessionPool` instance.