wkeeling / selenium-wire

Extends Selenium's Python bindings to give you the ability to inspect requests made by the browser.
MIT License
1.9k stars 254 forks source link

Certificate Not Secure #497

Closed Jey0707 closed 2 years ago

Jey0707 commented 2 years ago

Hi! I'm trying to use selenium-wire (needed for proxy), with undetected_chromedriver.v2.

When I start the driver, it say me who the certificate is not valid

Immagine 2022-01-31 093445 Immagine 2022-01-31 093508

My Code:


import undetected_chromedriver as uc
from selenium.webdriver import ActionChains

with open('proxy.txt') as f:
                lines = f.readlines()
                x = random.choice(lines)
                PROXY_HOST = x.split(':')[0]
                PROXY_PORT = x.split(':')[1]
                PROXY_USER = x.split(':')[2]
                PROXY_PASS = x.split(':')[3].replace("\n", "")
                options = {
                    'verify_ssl': False,
                    'proxy': {
                        'http': 'http://'+PROXY_USER+':'+PROXY_PASS+'@'+PROXY_HOST+':'+PROXY_PORT,
                        'https': 'https://'+PROXY_USER+':'+PROXY_PASS+'@'+PROXY_HOST+':'+PROXY_PORT,
                        'no_proxy': 'localhost,127.0.0.1'
                    }
                }

chrome_options = uc.ChromeOptions()
chrome_options.add_argument('--disable-popup-blocking') 
chrome_options.add_argument('--window-size=300,750') 
driver = Chrome(seleniumwire_options=options,use_subprocess=True)
driver.get('https://www.myip.com/') 
wkeeling commented 2 years ago

Have you installed Selenium Wire's certificate on the machine?