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.

chore: disable puppeteer deprecation warning about old `headless` mode

Martin Adámek15c7f670f034
diff --git a/packages/browser-pool/src/puppeteer/puppeteer-plugin.ts b/packages/browser-pool/src/puppeteer/puppeteer-plugin.ts
index 5dba90fa6..68f86d4ae 100644
--- a/packages/browser-pool/src/puppeteer/puppeteer-plugin.ts
+++ b/packages/browser-pool/src/puppeteer/puppeteer-plugin.ts
@@ -43,6 +43,11 @@ export class PuppeteerPlugin extends BrowserPlugin<
}
}
+ if (launchOptions!.headless === true) {
+ // to disable deprecation warnings, we should switch to `new` after more testing
+ launchOptions!.headless = 'old' as unknown as boolean;
+ }
+
let browser: PuppeteerTypes.Browser;
{