urllib3 不验证ssl
作者:互联网
import urllib3
# 禁用警告
urllib3.disable_warnings()
# urllib3 不验证ssl
_pool_params = dict(cert_reqs='CERT_NONE', assert_hostname=False)
url = 'https://www.baidu.com'
http = urllib3.PoolManager(**_pool_params)
res = http.request('get', url)
print(res.status)
标签:http,验证,res,urllib3,ssl,params,pool 来源: https://www.cnblogs.com/jiyu-hlzy/p/16648428.html