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
Applied feedback from PR comments
Jan Curna65753aad560
diff --git a/src/puppeteer_crawler.js b/src/puppeteer_crawler.jsindex 2d2d478dd..16b9197ad 100644--- a/src/puppeteer_crawler.js+++ b/src/puppeteer_crawler.js@@ -234,8 +234,8 @@ export default class PuppeteerCrawler {}).timeout(this.pageOpsTimeoutMillis, 'PuppeteerCrawler: handlePageFunction timed out.').finally(() => {- return Promise- .try(() => {+ return Promise.resolve()+ .then(() => {if (page) return page.close();}).timeout(PAGE_CLOSE_TIMEOUT_MILLIS, 'Operation timed out.')