Reputation: 51
I'm using selenium-wire with undetectable chromedriver and it's giving me: "Your Connection To This Site Is Not Secure" when I go into a site, and the https in the website address is crossed over, and it's saying that the certificate is invalid. The website's certificate is, however, not invalid. When I go into the website on my normal browser, it works as it should. I have noticed this happening on all https websites, i.e. https://httpbin.org/headers and https://google.com/, etc.
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')
This doesn't give me a popup or anything and I can still use the site normally, but I would like to get it fixed.
How can I go about fixing this?
Upvotes: 3
Views: 18540
Reputation: 337
Using python -m seleniumwire extractcert
and setup chrome browser is the good approach.
But if you want to automate this, you can also run:
*Nix
certutil -d sql:$HOME/.pki/nssdb -A -t TC -n "Selenium Wire" -i /path/to/ca.crt
Windows
certutil -addstore -f "Root" /path/to/ca.crt
To pragmatically fix the certificate issue without having to manually edit chrome setup.
Upvotes: 2
Reputation: 1
The Certificate has been moved from https://raw.githubusercontent.com/wkeeling/selenium-wire/master/seleniumwire/proxy/ca.crt to https://github.com/wkeeling/selenium-wire/raw/master/seleniumwire/ca.crt
Source: https://github.com/wkeeling/selenium-wire/issues/120#issuecomment-877845102
Upvotes: 0
Reputation: 143
Install the certificate in chrome. You can get the certificate using python -m seleniumwire extractcert
or you can download that from https://raw.githubusercontent.com/wkeeling/selenium-wire/master/seleniumwire/proxy/ca.crt
How to install the certificate.
Upvotes: 12