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.

repaired validation

Petr Patekaabf2bf61b25
diff --git a/src/cheerio_crawler.js b/src/cheerio_crawler.js
index cd19fde29..edf2abb8d 100644
--- a/src/cheerio_crawler.js
+++ b/src/cheerio_crawler.js
@@ -238,7 +238,7 @@ class CheerioCrawler {
checkParamOrThrow(apifyProxyGroups, 'options.apifyProxyGroups', 'Maybe [String]');
checkParamOrThrow(apifyProxySession, 'options.apifyProxySession', 'Maybe String');
checkParamOrThrow(proxyUrls, 'options.proxyUrls', 'Maybe [String]');
- checkParamOrThrow(handlePageFunction, 'options.prepareRequestFunction', 'Maybe Function');
+ checkParamOrThrow(prepareRequestFunction, 'options.prepareRequestFunction', 'Maybe Function');
// Enforce valid proxy configuration
if (proxyUrls && !proxyUrls.length) throw new Error('Parameter "options.proxyUrls" of type Array must not be empty');
if (useApifyProxy && proxyUrls) throw new Error('Cannot combine "options.useApifyProxy" with "options.proxyUrls"!');