ICode9

精准搜索请尝试: 精确搜索
首页 > 其他分享> 文章详细

urllib3 不验证ssl

2022-09-02 03:30:08  阅读:123  来源: 互联网

标签:http 验证 res urllib3 ssl params pool


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

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有