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.

chore(hotfix): Fix SitemapRequestList persist state event binding (#2924)

Jan Buchara6a70731e756
diff --git a/packages/core/src/storages/sitemap_request_list.ts b/packages/core/src/storages/sitemap_request_list.ts
index de9b9dbeb..3c6adbe5e 100644
--- a/packages/core/src/storages/sitemap_request_list.ts
+++ b/packages/core/src/storages/sitemap_request_list.ts
@@ -418,7 +418,7 @@ export class SitemapRequestList implements IRequestList {
void requestList.load({ parseSitemapOptions: options.parseSitemapOptions });
if (requestList.persistenceOptions.enable) {
- requestList.events.on(EventType.PERSIST_STATE, requestList.persistState);
+ requestList.events.on(EventType.PERSIST_STATE, async () => await requestList.persistState());
}
options?.signal?.addEventListener('abort', () => {