解决Python3 爬虫InsecureRequestWarning的问题

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/Kwoky/article/details/83691109

问题:

使用Python3 requests发送HTTPS请求,已经关闭认证(verify=False)情况下,控制台会输出以下错误:

InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings

import urllib3

urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)

猜你喜欢

转载自blog.csdn.net/Kwoky/article/details/83691109