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
Remove outdated comments
Ondra Urban9e627b757e98
diff --git a/src/puppeteer_pool.js b/src/puppeteer_pool.jsindex 852ddf4e8..b54ae5be4 100644--- a/src/puppeteer_pool.js+++ b/src/puppeteer_pool.js@@ -337,8 +337,6 @@ class PuppeteerPool {if (!instance.killed) log.error('PuppeteerPool: Puppeteer sent "disconnect" event. Maybe it crashed???', { id });this._retireInstance(instance);});- // This one is done manually in Puppeteerpool.newPage() so that it happens immediately.- // browser.on('targetcreated', () => instance.activePages++);}/**@@ -744,7 +742,7 @@ class PuppeteerPool {_killInstanceWithNoPages(instance) {const { id } = instance;if (instance.activePages === 0 && this.retiredInstances[id]) {- // Run this with a delay, otherwise page.close() that initiated this 'targetdestroyed' event+ // Run this with a delay, otherwise page.close()// might fail with "Protocol error (Target.closeTarget): Target closed."setTimeout(() => {log.debug('PuppeteerPool: Killing retired browser because it has no active pages', { id });