Python请求库 - 抑制SSL错误

时间:2015-11-04 16:44:48

标签: python ssl python-requests

我使用python请求库编写了一个web scraper,它模仿浏览器XHR对scraper网站的请求。但是,在连接到站点时,请求会生成InsecureRequestsWarning。我设置了verify = False,这样我至少可以连接。但是,对于每个请求,它都会生成SSL错误 有没有办法抑制这些错误? (我不清楚为什么存在SSL错误,域证书在通过SSL检查器检查时看起来有效 - 请求是否会以某种方式分解SSL问题?)

InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.org/en/latest/security.html
  InsecureRequestWarning)

0 个答案:

没有答案
相关问题