Chrome 如何删除SSL证书检查/错误与 puppet 在无头模式,?

xriantvc  于 12个月前  发布在  Go
关注(0)|答案(1)|浏览(148)

尝试下面的代码,但得到一个错误。
错误:net::ERR_SSL_VERSION_OR_CIPHER_MISMATCH at https://www.xxxxxxsolutions.com/

const puppeteer = require("puppeteer");
(async () => {
  const browser = await puppeteer.launch({
    ignoreHTTPSErrors: true,
    acceptInsecureCerts: true,
    args: [
      "--proxy-bypass-list=*",
      "--disable-gpu",
      "--disable-dev-shm-usage",
      "--disable-setuid-sandbox",
      "--no-first-run",
      "--no-sandbox",
      "--no-zygote",
      "--single-process",
      "--ignore-certificate-errors",
      "--ignore-certificate-errors-spki-list",
      "--enable-features=NetworkService",
    ],
  });
  const page = await browser.newPage();
  try {
    await page.goto("https://www.xxxxxxxsolutions.com/", {
      waitUntil: "networkidle2",
      timeout: 59000,
    });
    const cookies = await page._client.send("Network.getAllCookies");
    JSON.stringify(cookies, null, 4);
  } catch (e) {
    console.log(e);
  }

  await browser.close();
})();

字符串


的数据

t3irkdon

t3irkdon1#

@mujuonly,这是版本相关问题。请尝试1.16.0以上或最新版本2.0的相同代码。它工作正常。

相关问题