Closed shawncafu closed 3 years ago
似乎是macOS下SSL证书错误 找到一个方法: 曾几何时,我偶然发现了这个问题。如果您使用的是macOS,请转至Macintosh HD>应用程序> Python3.6文件夹(或您使用的任何版本的python)>双击“ Install Certificates.command”文件。:D
成功了ORZ,macOS好麻烦
您好,
非常感谢您分享您解决问题的经验!
另外还请注意,请不要在任何公共场合暴露您的cookie,这会导致您的账户存在风险,目前已将其删除,还请尽快登出您的账户并重新登录,谢谢!
感谢您的分享,祝好!
您好,
非常感谢您分享您解决问题的经验!
另外还请注意,请不要在任何公共场合暴露您的cookie,这会导致您的账户存在风险,目前已将其删除,还请尽快登出您的账户并重新登录,谢谢!
感谢您的分享,祝好!
感谢提醒,已重新登录
小白 不懂编程 烦请作者大大看看我这个报错是什么原因?系统是macOS11.2.3,M1,Chrome90 之前用另外一个软件运行的时候python是没有问题的,pillow和selenium还有Google chrome Drivers也都装了
运行之后提示: ======================================= RESTART: /Users/bieguni/Downloads/BW/Manga_downloader-master/main.py ======================================= Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 1346, in do_open h.request(req.get_method(), req.selector, req.data, headers, File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 1255, in request self._send_request(method, url, body, headers, encode_chunked) File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 1301, in _send_request self.endheaders(body, encode_chunked=encode_chunked) File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 1250, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 1010, in _send_output self.send(msg) File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 950, in send self.connect() File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py", line 1424, in connect self.sock = self._context.wrap_socket(self.sock, File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/ssl.py", line 500, in wrap_socket return self.sslsocket_class._create( File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/ssl.py", line 1040, in _create self.do_handshake() File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/ssl.py", 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:1123)
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/Users/bieguni/Downloads/BW/Manga_downloader-master/main.py", line 40, in
downloader = Downloader(*settings)
File "/Users/bieguni/Downloads/BW/Manga_downloader-master/downloader.py", line 64, in init
self.init_function()
File "/Users/bieguni/Downloads/BW/Manga_downloader-master/downloader.py", line 116, in init_function
self.get_driver()
File "/Users/bieguni/Downloads/BW/Manga_downloader-master/downloader.py", line 91, in get_driver
self.driver = uc.Chrome(options=option)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/undetected_chromedriver/init.py", line 43, in new
ChromeDriverManager(args, *kwargs).install()
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/undetected_chromedriver/init.py", line 144, in init
self.target_version = self.get_release_version_number().version[
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/undetected_chromedriver/init.py", line 209, in get_release_version_number
return LooseVersion(urlopen(self.class.DL_BASE + path).read().decode())
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 214, in urlopen
return opener.open(url, data, timeout)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 517, in open
response = self._open(req, data)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 534, in _open
result = self._call_chain(self.handle_open, protocol, protocol +
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 494, in _call_chain
result = func(args)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 1389, in https_open
return self.do_open(http.client.HTTPSConnection, req,
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 1349, in do_open
raise URLError(err)
urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1123)>
另外这是我main.py里面的内容,不知哪里填错了 ''' Main file '''
from downloader import Downloader
settings = {
Manga urls, should be the same website
}
if name == 'main': downloader = Downloader(**settings) downloader.download()