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.

Adding missing await

Marek Trunkat73117977b8a1
diff --git a/src/request_queue.js b/src/request_queue.js
index 05965964b..1ae769c53 100644
--- a/src/request_queue.js
+++ b/src/request_queue.js
@@ -677,7 +677,7 @@ export class RequestQueueLocal {
async fetchNextRequest() {
await this.initializationPromise;
- const files = readdirPromised(this.localPendingEmulationPath);
+ const files = await readdirPromised(this.localPendingEmulationPath);
let request = null;
while (!request && files.length) {