selenium-wire icon indicating copy to clipboard operation
selenium-wire copied to clipboard

seleniumwire and undetected_chromedriver

Open Donato360 opened this issue 2 years ago • 1 comments

I have python 3.9 installed in a virtual environment.

My virtual environment contains the following libraries:

seleniumwire
undetected_chromedriver

I have also installed the certificate ca.ctr in my virtual environment root using the command:

python3 -m seleniumwire extractcert

In the root I have a script that try to access a website e.g. https://www.google.com/

Here my code:

import seleniumwire.undetected_chromedriver as uc

options = { 'ca_cert': '/ca.crt' }

chrome_options = uc.ChromeOptions()

driver = uc.Chrome( options=chrome_options, seleniumwire_options=options )

url = "https://www.google.com/"

driver.get(self.url)

I get the following error when running the script:

line 1309, in do_handshake self._sslobj.do_handshake() ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1129)

Please note I am trying to make this work on a virtual environment installed on a Mac. thank you for your help

Donato360 avatar Jan 10 '23 01:01 Donato360

Botasaurus Framework supports SSL with authenticated proxy sych as http://username:password@proxy-provider-domain:port.

seleniumwire-vs-botasaurus

Installation

pip install botasaurus

Example

from botasaurus import *

@browser(proxy="http://username:password@proxy-provider-domain:port") # TODO: Replace with your own proxy 
def visit_ipinfo(driver: AntiDetectDriver, data):
    driver.get("https://ipinfo.io/")
    driver.prompt()

visit_ipinfo()

You can learn about Botasaurus Here.

Chetan11-dev avatar Dec 23 '23 12:12 Chetan11-dev