如何在 Pyppeteer 中禁用 SSL 证书验证

如果你看到类似这样的错误消息

pyppeteer_ignore_https.txt
pyppeteer.errors.PageError: net::ERR_CERT_AUTHORITY_INVALID at https://10.9.5.12/

在 Pyppeteer 中并且你确定只想跳过证书验证,将

pyppeteer_launch.py
browser = await launch()

改为

pyppeteer_launch_ignore_https.py
browser = await launch({"ignoreHTTPSErrors": True})

or add "ignoreHTTPSErrors": True 改为 the list of parameters 改为 launch if you already have other parameters there. This will just ignore the net::ERR_CERT_AUTHORITY_INVALID and other, related HTTPS errors.


Check out similar posts by category: Pyppeteer, Python