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.
TypeScript apifyautomationcrawlercrawlingheadlessheadless-chromejavascriptnodejsnpmplaywrightpuppeteerscraperscrapingtypescriptweb-crawlerweb-crawlingweb-scraping
Rename misleading function
Ondra Urbane12c65b2a7f9
diff --git a/src/request_queue.js b/src/request_queue.jsindex 05e51c084..6b7136864 100644--- a/src/request_queue.js+++ b/src/request_queue.js@@ -654,20 +654,15 @@ export class RequestQueueLocal {this.modifiedAt = stats.mtime;this.accessedAt = stats.atime;- const files = [];for (const filePath of filePaths) {- const file = await this._readFile(filePath);- files.push(file);+ await this._saveRequestIdToQueueOrderNo(filePath);}- return files;}- async _readFile(filepath) {+ async _saveRequestIdToQueueOrderNo(filepath) {const str = await readFilePromised(filepath);const request = JSON.parse(str);- const queueOrderNo = filePathToQueueOrderNo(filepath);-- this.requestIdToQueueOrderNo[request.id] = queueOrderNo;+ this.requestIdToQueueOrderNo[request.id] = filePathToQueueOrderNo(filepath);}_getFilePath(queueOrderNo, isHandled = false) {