Chrome Selenium-Wire您的连接不安全

r9f1avp5  于 2023-06-19  发布在  Go
关注(0)|答案(2)|浏览(482)

我使用的是 selenium 线和无法检测的chromedriver,它给我:当我进入某个站点时,“您的连接到此站点不安全”,网址中的https被交叉,说明证书无效。然而,网站的证书并非无效。当我在我的普通浏览器上进入网站时,它就像它应该的那样工作。我注意到所有https网站上都发生了这种情况。**https://httpbin.org/headershttps://google.com/**等

import seleniumwire.undetected_chromedriver as uc
if __name__ == '__main__':
    options = uc.ChromeOptions()
    driver = uc.Chrome(
        options=options,
        seleniumwire_options={}
    )

    driver.get('https://httpbin.org/headers')

这不给予我一个弹出窗口或任何东西,我仍然可以正常使用该网站,但我想得到它修复。
我该怎么解决这个问题?

xqk2d5yq

xqk2d5yq1#

在chrome中安装证书。您可以使用python -m seleniumwire extractcert获取证书,也可以从https://raw.githubusercontent.com/wkeeling/selenium-wire/master/seleniumwire/proxy/ca.crt下载如何安装证书。

  • 打开Chrome设置
  • 搜索管理证书并打开
  • 单击“受信任的根证书颁发机构”
  • 导入刚刚下载的证书。

相关问题