wkeeling / selenium-wire

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

OpenSSL.crypto.Error: [] #692

Open yitiaofeixiangdeyu opened 1 year ago

yitiaofeixiangdeyu commented 1 year ago

An error occurs when demo is used

from seleniumwire import webdriver  # Import from seleniumwire

# Create a new instance of the Chrome driver
driver = webdriver.Chrome()

# Go to the Google home page
driver.get('https://www.google.com')

# Access requests via the `requests` attribute
for request in driver.requests:
    if request.response:
        print(
            request.url,
            request.response.status_code,
            request.response.headers['Content-Type']
        )

image

yitiaofeixiangdeyu commented 1 year ago

Captured requests and responses are stored in the system temp folder by default (that’s /tmp on Linux and usually C:\Users\\AppData\Local\Temp on Windows) in a sub-folder called .seleniumwire. Clearing the cache solves the problem

yitiaofeixiangdeyu commented 1 year ago

pyinstaller

pyinstaller -F --key feiyu --add-data 'ca.crt;seleniumwire' --add-data 'ca.key;seleniumwire' --onefile test.py