提问者:小点点

Ubuntu Python请求获取不正确的SSL证书


Python中的请求包似乎引用了Ubuntu中不正确的SSL证书。我正在使用请求2.6。2.该代码在Mac上运行良好,但在Ubuntu上失败。谢谢你的帮助!

本请求:

query_string = https://lsapi.seomoz.com/linkscape/links/youtube.com?Sort=page_authority&Source=page_to_page&Filter=internal&LinkCols=4&Limit=50&Offset=0

requests.get(query_string, auth=(self.accessid,self.key))

生成此错误输出:

回溯(最近一次调用):文件“/home/mark/venvs/nessus/local/lib/python2.7/site packages/IPython/core/interactiveshell.py”,第3035行,在请求中的运行代码执行(代码obj,self.user\u全局,self.user\n)文件”第1行。得到('https://lsapi.seomoz.com/linkscape/links/youtube.com?Sort=page_authority


共1个答案

匿名用户

这个问题归结为与这个问题相同:您使用的Python版本不支持SNI。遵循这个答案中的建议。