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
renamed storeName option to keyValueStoreName
metalwarrior665c38f4fbb1a2c
diff --git a/src/puppeteer_utils.js b/src/puppeteer_utils.jsindex e62bb8421..d5fdb121f 100644--- a/src/puppeteer_utils.js+++ b/src/puppeteer_utils.js@@ -537,15 +537,15 @@ const saveSnapshot = async (page, options = {}) => {checkParamOrThrow(page, 'page', 'Object');checkParamOrThrow(options, 'options', 'Object');- const { saveScreenshot = true, saveHtml = true, storeName = null } = options;+ const { saveScreenshot = true, saveHtml = true, keyValueStoreName = null } = options;key = options.key || DEFAULT_KEY;checkParamOrThrow(saveScreenshot, 'saveScreenshot', 'Boolean');checkParamOrThrow(saveHtml, 'saveHtml', 'Boolean');checkParamOrThrow(key, 'key', 'String');- checkParamOrThrow(storeName, 'storeName', 'Maybe String');+ checkParamOrThrow(keyValueStoreName, 'keyValueStoreName', 'Maybe String');- const store = await openKeyValueStore(storeName);+ const store = await openKeyValueStore(keyValueStoreName);if (saveScreenshot) {const screenshotBuffer = await page.screenshot({ fullPage: true });diff --git a/test/puppeteer_utils.js b/test/puppeteer_utils.jsindex 35d1feca4..3adceec59 100644--- a/test/puppeteer_utils.js+++ b/test/puppeteer_utils.js@@ -396,7 +396,7 @@ describe('Apify.utils.puppeteer', () => {.withExactArgs('TEST-STORE').resolves(object);- await Apify.utils.puppeteer.saveSnapshot(page, { key: 'TEST', storeName: 'TEST-STORE' });+ await Apify.utils.puppeteer.saveSnapshot(page, { key: 'TEST', keyValueStoreName: 'TEST-STORE' });expect(stub.calledWithExactly('TEST.png', screenshot, { contentType: 'image/png' })).to.be.eql(true);expect(stub.calledWithExactly('TEST.html', contentHTML, { contentType: 'text/html' })).to.be.eql(true);