Traceback (most recent call last):
File "C:\Users\nenuk\OneDrive\Desktop\Creator\32.py", line 556, in <module>
driver = uc.Chrome(options=opts)
File "C:\Users\nenuk\AppData\Local\Programs\Python\Python312\Lib\site-packages\undetected_chromedriver\__init__.py", line 258, in __init__
self.patcher.auto()
File "C:\Users\nenuk\AppData\Local\Programs\Python\Python312\Lib\site-packages\undetected_chromedriver\patcher.py", line 178, in auto
self.unzip_package(self.fetch_package())
File "C:\Users\nenuk\AppData\Local\Programs\Python\Python312\Lib\site-packages\undetected_chromedriver\patcher.py", line 287, in fetch_package
return urlretrieve(download_url)[0]
File "C:\Users\nenuk\AppData\Local\Programs\Python\Python312\Lib\urllib\request.py", line 240, in urlretrieve
with contextlib.closing(urlopen(url, data)) as fp:
File "C:\Users\nenuk\AppData\Local\Programs\Python\Python312\Lib\urllib\request.py", line 215, in urlopen
return opener.open(url, data, timeout)
File "C:\Users\nenuk\AppData\Local\Programs\Python\Python312\Lib\urllib\request.py", line 521, in open
response = meth(req, response)
File "C:\Users\nenuk\AppData\Local\Programs\Python\Python312\Lib\urllib\request.py", line 630, in http_response
response = self.parent.error(
File "C:\Users\nenuk\AppData\Local\Programs\Python\Python312\Lib\urllib\request.py", line 559, in error
return self._call_chain(*args)
File "C:\Users\nenuk\AppData\Local\Programs\Python\Python312\Lib\urllib\request.py", line 492, in _call_chain
result = func(*args)
File "C:\Users\nenuk\AppData\Local\Programs\Python\Python312\Lib\urllib\request.py", line 639, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 404: Not Found
我如何解决这个问题,上次我重新下载了它可以运行的所有内容,但现在却不起作用。
您需要更改 unDetected_chromedriver\patcher.py 中的 fetch_package(self)
由于旧的 download_url 无法获取 chrome 驱动程序,因此您应该使用“https://storage.googleapis.com/”替换“https://edgedl.me.gvt1.com/edgedl/chrome/”。
还是行不通 ?文件 c:\Python310\lib\urllib\request.py:496,在 OpenerDirector._call_chain(self, chain, kind, meth_name, *args) 494 中处理程序中的处理程序: 495 func = getattr(handler, meth_name) --> [第 496 章] 第 497 章 [第 498 章]
文件c:\ Python310 \ lib \ urllib \ request.py:643,在HTTPDefaultErrorHandler.http_error_default(self,req,fp,code,msg,hdrs)642 def http_error_default(self,req,fp,code,msg,hdrs): --> 643 引发 HTTPError(req.full_url, code, msg, hdrs, fp)
HTTPError:HTTP 错误 404:未找到
v3.5.5 中已解决 unDetected_chromedriver 的问题。
卸载并再次安装 unDetected_chromedriver。