1
import pafy
url="https://www.youtube.com/watch?v=EFzOA0-jfOo"
v= pafy.new(url)
print(v.title)

错误:无法下载网页:(由 URLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] 证书验证失败:无法获取本地颁发者证书 (_ssl.c:1108)')) 追溯(最近一次通话最后一次) :文件“/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/urllib/request.py”,第 1317 行,在 do_open h.request(req.get_method(), req.selector, req.数据,标题,文件“/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/http/client.py”,第 1230 行,在请求中 self._send_request(方法,url,正文,标题,encode_chunked ) 文件“/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/http/client.py”,第 1276 行,_send_request self.endheaders(body, encode_chunked=encode_chunked) 文件“/Library/Frameworks /Python。framework/Versions/3.8/lib/python3.8/http/client.py”,第 1225 行,在 endheaders self._send_output(message_body, encode_chunked=encode_chunked) 文件“/Library/Frameworks/Python.framework/Versions/3.8/lib /python3.8/http/client.py”,第 1004 行,在 _send_output self.send(msg) 文件“/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/http/client.py” ,第 944 行,在发送 self.connect() 文件“/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/http/client.py”,第 1399 行,在 connect self.sock = self. _context.wrap_socket(self.sock, File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/ssl.py", line 500, in wrap_socket return self.sslsocket_class._create( File "/Library /Frameworks/Python.framework/Versions/3.8/lib/python3.8/ssl.py",第 1040 行,在 _create self.do_handshake() 文件“/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/ssl.py”中,第 1309 行,在 do_handshake self._sslobj.do_handshake() ssl 中。 SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] 证书验证失败:无法获取本地颁发者证书 (_ssl.c:1108)

在处理上述异常的过程中,又出现了一个异常:

回溯(最后一次调用):_request_webpage 中的文件“/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/youtube_dl/extractor/common.py”,第 627 行,返回 self。 _downloader.urlopen(url_or_request) 文件“/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/youtube_dl/YoutubeDL.py”,第 2238 行,在 urlopen 返回 self._opener.open( req, timeout=self._socket_timeout) 文件“/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/urllib/request.py”,第 525 行,打开响应 = self._open(req, data ) 文件“/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/urllib/request.py”,第 542 行,在 _open 结果 = self._call_chain(self.handle_open, 协议, 协议 + 文件" /库/框架/Python。framework/Versions/3.8/lib/python3.8/urllib/request.py”,第 502 行,在 _call_chain 结果 = func(*args) 文件“/Library/Frameworks/Python.framework/Versions/3.8/lib/python3. 8/site-packages/youtube_dl/utils.py”,第 2726 行,在 https_open 返回 self.do_open(functools.partial( 文件“/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/urllib/ request.py”,第 1320 行,在 do_open 中引发 URLError(err) urllib.error.URLError:在 do_open 中引发 URLError(err) urllib.error.URLError:在 do_open 中引发 URLError(err) urllib.error.URLError:

在处理上述异常的过程中,又出现了一个异常:

Traceback(最近一次调用最后):文件“/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/youtube_dl/YoutubeDL.py”,第 797 行,在 extract_info ie_result = ie.extract (url) 文件“/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/youtube_dl/extractor/common.py”,第 530 行,提取 ie_result = self._real_extract(url) _real_extract video_webpage = self._download_webpage(url, video_id) 文件中的文件“/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/youtube_dl/extractor/youtube.py”,第 1681 行“/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/youtube_dl/extractor/common.py”,第 791 行,在_download_webpage res = self._download_webpage_handle(文件“/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/youtube_dl/extractor/youtube.py”,第 271 行,在 _download_webpage_handle 返回 super(YoutubeBaseInfoExtractor, self)._download_webpage_handle( File "/ Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/youtube_dl/extractor/common.py”,第 660 行,在 _download_webpage_handle urlh = self._request_webpage(url_or_request, video_id, note, errnote,致命,数据=数据,标头=标头,查询=查询,预期状态=预期状态)文件“/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/youtube_dl/extractor/common.py ",第 645 行,在 _request_webpage 中引发 ExtractorError(errmsg, sys.exc_info()[2], cause=err) youtube_dl.utils.ExtractorError:无法下载网页:(由 URLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] 证书验证失败:无法获取本地颁发者证书 (_ssl.c:1108)')) 引起

在处理上述异常的过程中,又出现了一个异常:

回溯(最后一次调用):文件“/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pafy/backend_youtube_dl.py”,第 40 行,在 _fetch_basic self._ydl_info = ydl .extract_info(self.videoid, download=False) 文件“/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/youtube_dl/YoutubeDL.py”,第 820 行,在 extract_info self. report_error(compat_str(e), e.format_traceback()) 文件“/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/youtube_dl/YoutubeDL.py”,第 625 行,在 report_error self.trouble(error_message, tb) 文件“/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/youtube_dl/YoutubeDL.py”,第 595 行,遇到问题引发 DownloadError(message, exc_info) youtube_dl.utils。下载错误:错误:无法下载网页:(由 URLError(SSLCertVerificationError(1,'[SSL: CERTIFICATE_VERIFY_FAILED] 证书验证失败:无法获取本地颁发者证书(_ssl.c:1108)')))

在处理上述异常的过程中,又出现了一个异常:

回溯(最后一次调用):文件“YtDow.py”,第 3 行,在 v=pafy.new(url) 文件“/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site- packages/pafy/pafy.py”,第 124 行,在新返回 Pafy(url, basic, gdata, size, callback, ydl_opts=ydl_opts) 文件“/Library/Frameworks/Python.framework/Versions/3.8/lib/python3. 8/site-packages/pafy/backend_youtube_dl.py”,第 31 行,在init super(YtdlPafy, self) 中。init (*args, **kwargs) 文件“/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pafy/backend_shared.py”,第 97 行,在init self._fetch_basic() 文件“/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pafy/backend_youtube_dl.py”,第 43 行,在 _fetch_basic 中引发 IOError(str(e).替换('YouTube说','Youtube说'))OSError:错误:无法下载网页:(由URLError(SSLCertVerificationError(1,'[SSL:CERTIFICATE_VERIFY_FAILED]证书验证失败:无法获取本地颁发者证书(_ssl. c:1108)'))) venkatrimmalapudi@Venkats-MacBook-Air python % vi YtDow.py
venkatrimmalapudi@Venkats-MacBook-Air python % python3 YtDow.py 错误:无法下载网页:(由 URLError(SSLCertVerificationError(1,'[SSL:CERTIFICATE_VERIFY_FAILED] 证书验证失败:无法获取本地颁发者证书(_ssl.c: 1108)'))) 回溯(最近一次调用最后):文件“/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/urllib/request.py”,第 1317 行,在 do_open h.request (req.get_method(),req.selector,req.data,标题,文件“/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/http/client.py”,第1230行,在请求中self._send_request(method, url, body, headers, encode_chunked) 文件“/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/http/client.py”,第 1276 行,在 _send_request self.endheaders (身体,encode_chunked=encode_chunked) 文件“/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/http/client.py”,第 1225 行,在 endheaders self._send_output(message_body, encode_chunked=encode_chunked) 文件中“/ Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/http/client.py”,第 1004 行,在 _send_output self.send(msg) 文件中“/Library/Frameworks/Python.framework/Versions/3.8 /lib/python3.8/http/client.py”,第 944 行,在发送 self.connect() 文件“/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/http/client.py ",第 1399 行,在连接 self.sock = self._context.wrap_socket(self.sock,文件 "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/ssl.py",第 500 行,在 wrap_socket 返回 self.sslsocket_class._create( 文件 "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/ssl.py”,第 1040 行,在 _create self.do_handshake() 文件中“/Library/Frameworks/Python.framework/Versions/3.8/lib /python3.8/ssl.py",第 1309 行,在 do_handshake self._sslobj.do_handshake() ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] 证书验证失败:无法获取本地颁发者证书 (_ssl.c:1108)

在处理上述异常的过程中,又出现了一个异常:

回溯(最后一次调用):_request_webpage 中的文件“/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/youtube_dl/extractor/common.py”,第 627 行,返回 self。 _downloader.urlopen(url_or_request) 文件“/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/youtube_dl/YoutubeDL.py”,第 2238 行,在 urlopen 返回 self._opener.open( req, timeout=self._socket_timeout) 文件“/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/urllib/request.py”,第 525 行,打开响应 = self._open(req, data ) 文件“/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/urllib/request.py”,第 542 行,在 _open 结果 = self._call_chain(self.handle_open, 协议, 协议 + 文件" /库/框架/Python。framework/Versions/3.8/lib/python3.8/urllib/request.py”,第 502 行,在 _call_chain 结果 = func(*args) 文件“/Library/Frameworks/Python.framework/Versions/3.8/lib/python3. 8/site-packages/youtube_dl/utils.py”,第 2726 行,在 https_open 返回 self.do_open(functools.partial( 文件“/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/urllib/ request.py”,第 1320 行,在 do_open 中引发 URLError(err) urllib.error.URLError:在 do_open 中引发 URLError(err) urllib.error.URLError:在 do_open 中引发 URLError(err) urllib.error.URLError:

在处理上述异常的过程中,又出现了一个异常:

Traceback(最近一次调用最后):文件“/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/youtube_dl/YoutubeDL.py”,第 797 行,在 extract_info ie_result = ie.extract (url) 文件“/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/youtube_dl/extractor/common.py”,第 530 行,提取 ie_result = self._real_extract(url) _real_extract video_webpage = self._download_webpage(url, video_id) 文件中的文件“/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/youtube_dl/extractor/youtube.py”,第 1681 行“/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/youtube_dl/extractor/common.py”,第 791 行,在_download_webpage res = self._download_webpage_handle(文件“/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/youtube_dl/extractor/youtube.py”,第 271 行,在 _download_webpage_handle 返回 super(YoutubeBaseInfoExtractor, self)._download_webpage_handle( File "/ Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/youtube_dl/extractor/common.py”,第 660 行,在 _download_webpage_handle urlh = self._request_webpage(url_or_request, video_id, note, errnote,致命,数据=数据,标头=标头,查询=查询,预期状态=预期状态)文件“/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/youtube_dl/extractor/common.py ",第 645 行,在 _request_webpage 中引发 ExtractorError(errmsg, sys.exc_info()[2], cause=err) youtube_dl.utils.ExtractorError:无法下载网页:(由 URLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] 证书验证失败:无法获取本地颁发者证书 (_ssl.c:1108)')) 引起

在处理上述异常的过程中,又出现了一个异常:

回溯(最后一次调用):文件“/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pafy/backend_youtube_dl.py”,第 40 行,在 _fetch_basic self._ydl_info = ydl .extract_info(self.videoid, download=False) 文件“/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/youtube_dl/YoutubeDL.py”,第 820 行,在 extract_info self. report_error(compat_str(e), e.format_traceback()) 文件“/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/youtube_dl/YoutubeDL.py”,第 625 行,在 report_error self.trouble(error_message, tb) 文件“/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/youtube_dl/YoutubeDL.py”,第 595 行,遇到问题引发 DownloadError(message, exc_info) youtube_dl.utils。下载错误:错误:无法下载网页:(由 URLError(SSLCertVerificationError(1,'[SSL: CERTIFICATE_VERIFY_FAILED] 证书验证失败:无法获取本地颁发者证书(_ssl.c:1108)')))

在处理上述异常的过程中,又出现了一个异常:

回溯(最后一次调用):文件“YtDow.py”,第 3 行,在 v=pafy.new(url) 文件“/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site- packages/pafy/pafy.py”,第 124 行,在新返回 Pafy(url, basic, gdata, size, callback, ydl_opts=ydl_opts) 文件“/Library/Frameworks/Python.framework/Versions/3.8/lib/python3. 8/site-packages/pafy/backend_youtube_dl.py”,第 31 行,在init super(YtdlPafy, self) 中。init (*args, **kwargs) 文件“/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pafy/backend_shared.py”,第 97 行,在init self._fetch_basic() 文件“/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pafy/backend_youtube_dl.py”,第 43 行,在 _fetch_basic 中引发 IOError(str(e).替换('YouTube说','Youtube说'))OSError:错误:无法下载网页:(由URLError(SSLCertVerificationError(1,'[SSL:CERTIFICATE_VERIFY_FAILED]证书验证失败:无法获取本地颁发者证书(_ssl. c:1108)'))) venkatrimmalapudi@Venkats-MacBook-Air python % vi YtDow.py
venkatrimmalapudi@Venkats-MacBook-Air python % python3 YtDow.py 错误:无法下载网页:(由 URLError(SSLCertVerificationError(1,'[SSL:CERTIFICATE_VERIFY_FAILED] 证书验证失败:无法获取本地颁发者证书(_ssl.c: 1108)'))) 回溯(最近一次调用最后):文件“/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/urllib/request.py”,第 1317 行,在 do_open h.request (req.get_method(),req.selector,req.data,标题,文件“/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/http/client.py”,第1230行,在请求中self._send_request(method, url, body, headers, encode_chunked) 文件“/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/http/client.py”,第 1276 行,在 _send_request self.endheaders (身体,encode_chunked=encode_chunked) 文件“/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/http/client.py”,第 1225 行,在 endheaders self._send_output(message_body, encode_chunked=encode_chunked) 文件中“/ Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/http/client.py”,第 1004 行,在 _send_output self.send(msg) 文件中“/Library/Frameworks/Python.framework/Versions/3.8 /lib/python3.8/http/client.py”,第 944 行,在发送 self.connect() 文件“/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/http/client.py ",第 1399 行,在连接 self.sock = self._context.wrap_socket(self.sock,文件 "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/ssl.py",第 500 行,在 wrap_socket 返回 self.sslsocket_class._create( 文件 "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/ssl.py”,第 1040 行,在 _create self.do_handshake() 文件中“/Library/Frameworks/Python.framework/Versions/3.8/lib /python3.8/ssl.py",第 1309 行,在 do_handshake self._sslobj.do_handshake() ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] 证书验证失败:无法获取本地颁发者证书 (_ssl.c:1108)

在处理上述异常的过程中,又出现了一个异常:

回溯(最后一次调用):_request_webpage 中的文件“/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/youtube_dl/extractor/common.py”,第 627 行,返回 self。 _downloader.urlopen(url_or_request) 文件“/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/youtube_dl/YoutubeDL.py”,第 2238 行,在 urlopen 返回 self._opener.open( req, timeout=self._socket_timeout) 文件“/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/urllib/request.py”,第 525 行,打开响应 = self._open(req, data ) 文件“/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/urllib/request.py”,第 542 行,在 _open 结果 = self._call_chain(self.handle_open, 协议, 协议 + 文件" /库/框架/Python。framework/Versions/3.8/lib/python3.8/urllib/request.py”,第 502 行,在 _call_chain 结果 = func(*args) 文件“/Library/Frameworks/Python.framework/Versions/3.8/lib/python3. 8/site-packages/youtube_dl/utils.py”,第 2726 行,在 https_open 返回 self.do_open(functools.partial( 文件“/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/urllib/ request.py”,第 1320 行,在 do_open 中引发 URLError(err) urllib.error.URLError:在 do_open 中引发 URLError(err) urllib.error.URLError:在 do_open 中引发 URLError(err) urllib.error.URLError:

在处理上述异常的过程中,又出现了一个异常:

Traceback(最近一次调用最后):文件“/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/youtube_dl/YoutubeDL.py”,第 797 行,在 extract_info ie_result = ie.extract (url) 文件“/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/youtube_dl/extractor/common.py”,第 530 行,提取 ie_result = self._real_extract(url) _real_extract video_webpage = self._download_webpage(url, video_id) 文件中的文件“/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/youtube_dl/extractor/youtube.py”,第 1681 行“/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/youtube_dl/extractor/common.py”,第 791 行,在_download_webpage res = self._download_webpage_handle(文件“/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/youtube_dl/extractor/youtube.py”,第 271 行,在 _download_webpage_handle 返回 super(YoutubeBaseInfoExtractor, self)._download_webpage_handle( File "/ Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/youtube_dl/extractor/common.py”,第 660 行,在 _download_webpage_handle urlh = self._request_webpage(url_or_request, video_id, note, errnote,致命,数据=数据,标头=标头,查询=查询,预期状态=预期状态)文件“/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/youtube_dl/extractor/common.py ",第 645 行,在 _request_webpage 中引发 ExtractorError(errmsg, sys.exc_info()[2], cause=err) youtube_dl.utils.ExtractorError:无法下载网页:(由 URLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] 证书验证失败:无法获取本地颁发者证书 (_ssl.c:1108)')) 引起

在处理上述异常的过程中,又出现了一个异常:

回溯(最后一次调用):文件“/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pafy/backend_youtube_dl.py”,第 40 行,在 _fetch_basic self._ydl_info = ydl .extract_info(self.videoid, download=False) 文件“/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/youtube_dl/YoutubeDL.py”,第 820 行,在 extract_info self. report_error(compat_str(e), e.format_traceback()) 文件“/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/youtube_dl/YoutubeDL.py”,第 625 行,在 report_error self.trouble(error_message, tb) 文件“/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/youtube_dl/YoutubeDL.py”,第 595 行,遇到问题引发 DownloadError(message, exc_info) youtube_dl.utils。下载错误:错误:无法下载网页:(由 URLError(SSLCertVerificationError(1,'[SSL: CERTIFICATE_VERIFY_FAILED] 证书验证失败:无法获取本地颁发者证书(_ssl.c:1108)')))

在处理上述异常的过程中,又出现了一个异常:

回溯(最后一次调用):文件“YtDow.py”,第 3 行,在 v=pafy.new(url) 文件“/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site- packages/pafy/pafy.py”,第 124 行,在新返回 Pafy(url, basic, gdata, size, callback, ydl_opts=ydl_opts) 文件“/Library/Frameworks/Python.framework/Versions/3.8/lib/python3. 8/site-packages/pafy/backend_youtube_dl.py”,第 31 行,在init super(YtdlPafy, self) 中。init (*args, **kwargs) 文件“/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pafy/backend_shared.py”,第 97 行,在init self._fetch_basic() 文件“/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pafy/backend_youtube_dl.py”,第 43 行,在 _fetch_basic 中引发 IOError(str(e).替换('YouTube说','Youtube说'))OSError:错误:无法下载网页:(由URLError(SSLCertVerificationError(1,'[SSL:CERTIFICATE_VERIFY_FAILED]证书验证失败:无法获取本地颁发者证书(_ssl. c:1108)')))

4

2 回答 2

1

全局搜索名为Install Certificates.command. 它位于 python 文件夹内。双击它,错误应该消失

于 2020-05-01T14:17:09.760 回答
0

您可以ydl_opts={'nocheckcertificate': True}pafy.new命令中添加。它可以写成

v = pafy.new(url,ydl_opts={'nocheckcertificate': True})

您可以在github 问题中找到它。

希望这可以帮助。

于 2021-09-28T21:55:33.437 回答