亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

urllib和“ssl:證書_驗證_失敗”錯誤

urllib和“ssl:證書_驗證_失敗”錯誤

海綿寶寶撒 2019-06-13 17:14:51
urllib和“ssl:證書_驗證_失敗”錯誤我收到以下錯誤:Exception in thread Thread-3:Traceback (most recent call last):File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 810, in        __bootstrap_innerself.run()File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 763, in  runself.__target(*self.__args, **self.__kwargs)File "/Users/Matthew/Desktop/Skypebot 2.0/bot.py", line 271, in processinfo = urllib2.urlopen(req).read()File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 154, in urlopenreturn opener.open(url, data, timeout)File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 431, in openresponse = self._open(req, data)File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 449, in _open'_open', req)File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 409, in _call_chainresult = func(*args)File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 1240, in https_opencontext=self._context)File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 1197, in do_openraise URLError(err)URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:581)>這是導致此錯誤的代碼:if input.startswith("!web"):    input = input.replace("!web ", "")          url = "https://domainsearch.p.mashape.com/index.php?name=" + input    req = urllib2.Request(url, headers={ 'X-Mashape-Key': 'XXXXXXXXXXXXXXXXXXXX' })    info = urllib2.urlopen(req).read()    Message.Chat.SendMessage ("" + info)我使用的API要求我使用HTTPS。我怎么能讓它繞過核查?
查看完整描述

3 回答

  • 3 回答
  • 0 關注
  • 844 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號