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.

Fix invalid type check

Ondra Urban34e1c3ed8c13
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2984d04a8..096f0f7d6 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,7 @@
+0.14.2 / 2019-04-25
+===================
+- Fix invalid type check in `puppeteerModule`.
+
0.14.1 / 2019-04-24
===================
- Made UI and UX improvements to `LiveViewServer` functionality.
diff --git a/package.json b/package.json
index 626634d3b..12890a028 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "apify",
- "version": "0.14.1",
+ "version": "0.14.2",
"description": "The scalable web crawling and scraping library for JavaScript. Enables development of data extraction and web automation jobs (not only) with headless Chrome and Puppeteer.",
"engines": {
"node": ">=8.14.0"
diff --git a/src/puppeteer.js b/src/puppeteer.js
index 98a569a00..1fbc35fbb 100644
--- a/src/puppeteer.js
+++ b/src/puppeteer.js
@@ -107,7 +107,7 @@ const launchPuppeteerWithProxy = async (puppeteer, opts) => {
/**
* Requires `puppeteer` package, uses a replacement or throws meaningful error if not installed.
*
- * @param {string} puppeteerModule
+ * @param {string|Object} puppeteerModule
* @ignore
*/
const getPuppeteerOrThrow = (puppeteerModule = 'puppeteer') => {
@@ -191,7 +191,7 @@ export const launchPuppeteer = async (options = {}) => {
checkParamOrThrow(options.args, 'options.args', 'Maybe [String]');
checkParamOrThrow(options.proxyUrl, 'options.proxyUrl', 'Maybe String');
checkParamOrThrow(options.useApifyProxy, 'options.useApifyProxy', 'Maybe Boolean');
- checkParamOrThrow(options.puppeteerModule, 'options.puppeteerModule', 'Maybe String');
+ checkParamOrThrow(options.puppeteerModule, 'options.puppeteerModule', 'Maybe String|Object');
if (options.useApifyProxy && options.proxyUrl) throw new Error('Cannot combine "options.useApifyProxy" with "options.proxyUrl"!');
if (options.liveView || options.liveViewOptions) {
log.deprecated('Live view is no longer available in Apify.launchPuppeteer() and launchPuppeteerOptions. '