|
环境描述: 我这里用的Python3.12.2,selenium_wire==5.1.0报错信息:截图代码File"D:\Code\Python\flask-api\.venv\Lib\site-packages\seleniumwire\webdriver.py",line28,infromseleniumwireimportbackend,utilsFile"D:\Code\Python\flask-api\.venv\Lib\site-packages\seleniumwire\backend.py",line4,infromseleniumwire.serverimportMitmProxyFile"D:\Code\Python\flask-api\.venv\Lib\site-packages\seleniumwire\server.py",line5,infromseleniumwire.handlerimportInterceptRequestHandlerFile"D:\Code\Python\flask-api\.venv\Lib\site-packages\seleniumwire\handler.py",line5,infromseleniumwireimportharFile"D:\Code\Python\flask-api\.venv\Lib\site-packages\seleniumwire\har.py",line11,infromseleniumwire.thirdparty.mitmproxyimportconnectionsFile"D:\Code\Python\flask-api\.venv\Lib\site-packages\seleniumwire\thirdparty\mitmproxy\connections.py",line10,infromseleniumwire.thirdparty.mitmproxy.netimporttls,tcpFile"D:\Code\Python\flask-api\.venv\Lib\site-packages\seleniumwire\thirdparty\mitmproxy\net\tls.py",line15,inimportseleniumwire.thirdparty.mitmproxy.optionsFile"D:\Code\Python\flask-api\.venv\Lib\site-packages\seleniumwire\thirdparty\mitmproxy\options.py",line5,infromseleniumwire.thirdparty.mitmproxyimportoptmanagerFile"D:\Code\Python\flask-api\.venv\Lib\site-packages\seleniumwire\thirdparty\mitmproxy\optmanager.py",line9,inimportblinker._saferefModuleNotFoundError:Nomodulenamed'blinker._saferef'解决办法:pipinstallblinker==1.7.0错误分析:selenium-wire缺少blinker==1.7.0库依赖,因此需要安装blinker==1.7.0 参考链接https://github.com/seleniumbase/SeleniumBase/issues/2782
|
|