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
Hotfix missing userData in transformRequestFunction
Ondra Urbancd46d5ade3cf
diff --git a/src/enqueue_links/shared.js b/src/enqueue_links/shared.jsindex 761d6c5dc..d28894919 100644--- a/src/enqueue_links/shared.js+++ b/src/enqueue_links/shared.js@@ -77,7 +77,15 @@ export function createRequests(requestOptions, pseudoUrls) {*/export function createRequestOptions(sources) {return sources- .map((src) => (typeof src === 'string' ? { url: src } : src))+ .map((src) => {+ const reqOpts = typeof src === 'string'+ ? { url: src }+ : src;+ // TODO Remove with v1, there are examples+ // which depend on userData existing here.+ reqOpts.userData = { ...reqOpts.userData };+ return reqOpts;+ }).filter(({ url }) => {try {return new URL(url).href;