Fork me on GitHub

python爬虫遇到https站点InsecureRequestWarning警告解决方案

python爬虫遇到https站点InsecureRequestWarning警告解决方案

加三行代码即可

from requests.packages.urllib3.exceptions import InsecureRequestWarning,InsecurePlatformWarning
requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
requests.packages.urllib3.disable_warnings(InsecurePlatformWarning)

 

以上。

posted @ 2017-08-21 16:33  流柯  阅读(956)  评论(0编辑  收藏  举报
访客: 浏览: