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
Updated version of client
Jaroslav Hejlekf49ba1a4983f
diff --git a/package.json b/package.jsonindex ffdc08990..86807ee61 100644--- a/package.json+++ b/package.json@@ -43,7 +43,7 @@"lint": "npm run build && eslint src test"},"dependencies": {- "apify-client": "^0.1.61",+ "apify-client": "^0.1.62","bluebird": "^3.5.0","content-type": "^1.0.3","proxy-chain": "^0.1.2",diff --git a/src/actor.js b/src/actor.jsindex e49aa1b24..dcf48827c 100644--- a/src/actor.js+++ b/src/actor.js@@ -338,7 +338,7 @@ export const pushData = (data, callback = null) => {const datasetId = getDefaultDatasetIdOrThrow();- const innerPromise = apifyClient.datasets.putItem({+ const innerPromise = apifyClient.datasets.putItems({datasetId,promise: promisePrototype,data,diff --git a/test/actor.js b/test/actor.jsindex f36b5e6c3..2a22da4d6 100644--- a/test/actor.js+++ b/test/actor.js@@ -970,7 +970,7 @@ describe('Apify.pushData()', () => {it('supports both promises and callbacks (on success)', () => {process.env.APIFY_DEFAULT_DATASET_ID = '1234';const mock = sinon.mock(Apify.client.datasets);- mock.expects('putItem')+ mock.expects('putItems').twice().returns(Promise.resolve(null));@@ -999,7 +999,7 @@ describe('Apify.pushData()', () => {it('supports both promises and callbacks (on error)', () => {process.env.APIFY_DEFAULT_DATASET_ID = '1234';const mock = sinon.mock(Apify.client.datasets);- mock.expects('putItem')+ mock.expects('putItems').twice().throws(new Error('Test error'));@@ -1049,7 +1049,7 @@ describe('Apify.pushData()', () => {Apify.setPromisesDependency(Promise);const mock = sinon.mock(Apify.client.datasets);- mock.expects('putItem')+ mock.expects('putItems').once().withArgs({datasetId,@@ -1079,7 +1079,7 @@ describe('Apify.pushData()', () => {Apify.setPromisesDependency(Promise);const mock = sinon.mock(Apify.client.datasets);- mock.expects('putItem')+ mock.expects('putItems').once().withArgs({datasetId,