requests禁止InsecureRequestWarning

InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised

当使用requests请求https接口时候,为了不验证,通常设置verify=False,此时会有个红色警告,我们可以通过下述方案禁止

import urllib3
urllib3.disable_warnings()
声明:原创文章,版权所有,转载请注明出处,https://litets.com。