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
Add desc option to local dataset getData
Ondra Urban689e6428d4ca
diff --git a/src/dataset.js b/src/dataset.jsindex 25d9d7ce8..8d9ae6b38 100644--- a/src/dataset.js+++ b/src/dataset.js@@ -517,6 +517,7 @@ export class DatasetLocal {checkParamOrThrow(opts, 'opts', 'Object');checkParamOrThrow(opts.limit, 'opts.limit', 'Maybe Number');checkParamOrThrow(opts.offset, 'opts.offset', 'Maybe Number');+ checkParamOrThrow(opts.desc, 'opts.desc', 'Maybe Boolean');if (opts.format && opts.format !== 'json') {throw new Error(`Datasets with local disk storage only support the "json" format (was "${opts.format}")`);@@ -539,7 +540,7 @@ export class DatasetLocal {this._updateMetadata();return {- items,+ items: opts.desc ? items.reverse() : items,total: this.counter,offset: opts.offset,count: items.length,