python requests报错InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate
来源:互联网 发布:等待软件工作室网址 编辑:程序博客网 时间:2024/05/21 04:22
使用requests库请求HTTPS时,因为忽略证书验证,导致每次运行时都会报错:
C:\Python3\lib\site-packages\requests\packages\urllib3\connectionpool.py:852: 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
InsecureRequestWarning)
虽然不影响脚本运行结果,但是总觉得不爽.
解决办法
导入 from requests.packages.urllib3.exceptions import InsecureRequestWarning
添加下面这行代码: requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
0 0
- python requests报错InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate
- requests https访问错误SSLError: certificate verify failed 及InsecureRequestWarning处理办法
- python requests 请求 https SSL 报错
- python请求https报错[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed
- pip install requests 报错 Could not fetch URL https://pypi.python.org/simple/requests/: There was ..r
- Python requests 移除SSL认证,控制台输出InsecureRequestWarning取消方法。
- Python的第三方库requests提示警告InsecureRequestWarning的问题
- wget获取https地址报错 --no-check-certificate
- Python requests 报错解决集锦
- python SSLError CERTIFICATE_VERIFY_FAILED InsecureRequestWarning
- python 小点心---requests 和 https
- openstack报错The request you have made requires authentication. (HTTP 401)
- python安装cryptography 报错: error adding symbols: Bad value
- 【python】request HTTPS代理
- 银豹 PYTHON requests.exceptions.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed
- 执行python脚本报错No module named requests解决方法
- 系统时间错误导致 python requests报错
- python导入requests库一直报错原因总结
- mac下替换debug.keystore文件
- 算法提高 P1003
- 关于单片机头文件的使用方法
- Java 内存模型
- 表示数值的字符串
- python requests报错InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate
- 我的MongoDB坎坷之路
- lintcode115不同路径问题(二)(动态规划easy)
- Closures in R: A useful abstraction
- OC——5.对象与函数
- Java基础知识(七)
- 在android系统上写C语言程序--开机启动该程序不进入安卓系统
- XXX银行软件测试规程(试用版)(定稿)
- Spring MVC基本原理