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
fix: improve enqueueLinks `limit` checking (#3038)
Jindřich Bär277412468dc0
diff --git a/packages/core/src/enqueue_links/enqueue_links.ts b/packages/core/src/enqueue_links/enqueue_links.tsindex e0912d83f..6ccbf643d 100644--- a/packages/core/src/enqueue_links/enqueue_links.ts+++ b/packages/core/src/enqueue_links/enqueue_links.ts@@ -480,7 +480,7 @@ export async function enqueueLinks(}let requests = await createFilteredRequests();- if (limit && limit < requests.length) {+ if (typeof limit === 'number' && limit < requests.length) {await reportSkippedRequests(requests.slice(limit), 'limit');requests = requests.slice(0, limit);}