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.

fix(puppeteer): rename `ignoreHTTPSErrors` to `acceptInsecureCerts` to support v23 (#2684)

Martin Adámekf3927e6c3487
diff --git a/packages/browser-crawler/src/internals/browser-crawler.ts b/packages/browser-crawler/src/internals/browser-crawler.ts
index 44844981c..3b162ed99 100644
--- a/packages/browser-crawler/src/internals/browser-crawler.ts
+++ b/packages/browser-crawler/src/internals/browser-crawler.ts
@@ -530,6 +530,7 @@ export abstract class BrowserCrawler<
*/
newPageOptions.pageOptions = {
ignoreHTTPSErrors: true,
+ acceptInsecureCerts: true,
};
}
}
@@ -747,6 +748,7 @@ export abstract class BrowserCrawler<
* @see https://github.com/puppeteer/puppeteer/blob/main/docs/api.md
*/
(launchContext.launchOptions as Dictionary).ignoreHTTPSErrors = true;
+ (launchContext.launchOptions as Dictionary).acceptInsecureCerts = true;
}
}
diff --git a/test/e2e/puppeteer-ignore-ssl-errors/actor/main.js b/test/e2e/puppeteer-ignore-ssl-errors/actor/main.js
index 1b6f54498..0a279d7d9 100644
--- a/test/e2e/puppeteer-ignore-ssl-errors/actor/main.js
+++ b/test/e2e/puppeteer-ignore-ssl-errors/actor/main.js
@@ -11,7 +11,7 @@ const mainOptions = {
await Actor.main(async () => {
const crawler = new PuppeteerCrawler({
- launchContext: { launchOptions: { ignoreHTTPSErrors: true } },
+ launchContext: { launchOptions: { acceptInsecureCerts: true } },
preNavigationHooks: [
(_ctx, goToOptions) => {
goToOptions.waitUntil = ['networkidle2'];
diff --git a/test/e2e/puppeteer-throw-on-ssl-errors/actor/main.js b/test/e2e/puppeteer-throw-on-ssl-errors/actor/main.js
index 49b739463..03b223e3c 100644
--- a/test/e2e/puppeteer-throw-on-ssl-errors/actor/main.js
+++ b/test/e2e/puppeteer-throw-on-ssl-errors/actor/main.js
@@ -11,7 +11,7 @@ const mainOptions = {
await Actor.main(async () => {
const crawler = new PuppeteerCrawler({
- launchContext: { launchOptions: { ignoreHTTPSErrors: false } }, // This is the default
+ launchContext: { launchOptions: { acceptInsecureCerts: false } }, // This is the default
preNavigationHooks: [
(_ctx, goToOptions) => {
goToOptions.waitUntil = ['networkidle2'];