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)

出现这个错误的原因是:

  

    requests 库其实是基于 urllib 编写的,对 urllib 进行了封装,使得使用时候的体验好了很多,现在 urllib 已经出到了3版本,功能和性能自然是提升了不少。
所以,requests最新版本也是基于最新的 urllib3 进行封装。 在urllib2时代对https的处理非常简单,只需要在请求的时候加上 verify=False 即可,这个参数的意思是忽略https安全证书的验证,也就是不验证证书的可靠性,直接请求,
这其实是不安全的,因为证书可以伪造,不验证的话就不能保证数据的真实性。 在urllib3时代,官方强制验证https的安全证书,如果没有通过是不能通过请求的,虽然添加忽略验证的参数,但是依然会 给出醒目的 Warning,这一点没毛病。

解决办法:

  添加两行代码  禁用 urllib3

import urllib3
urllib3.disable_warnings()

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 In的更多相关文章

  1. InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised.解决办法

    最近使用requests进行get请求的时候,控制台输出如下错误. InsecureRequestWarning: Unverified HTTPS request is being made. Ad ...

  2. https://pyobjc.readthedocs.io/en/latest/

    https://pyobjc.readthedocs.io/en/latest/ The PyObjC project aims to provide a bridge between the Pyt ...

  3. https://uwsgi-docs.readthedocs.io/en/latest/Async.html

    Beware! Async modes will not speed up your app, they are aimed at improving concurrency. Do not expe ...

  4. SICP 解题集 — SICP 解题集 https://sicp.readthedocs.io/en/latest/

    SICP 解题集 - SICP 解题集 https://sicp.readthedocs.io/en/latest/

  5. https://channels.readthedocs.io/en/latest/tutorial/part_2.htmlhttps://channels.readthedocs.io/en/latest/tutorial/part_2.html

    https://channels.readthedocs.io/en/latest/tutorial/part_2.html

  6. https://design-patterns.readthedocs.io/zh_CN/latest/index.html

    图说设计模式 - Graphic Design Patterns https://design-patterns.readthedocs.io/zh_CN/latest/index.html

  7. pytest文档46-关于https请求警告问题(InsecureRequestWarning: Unverified HTTPS request is being made)

    前言 使用 pytest 执行 https 请求用例的时候,控制台会出现警告:InsecureRequestWarning: Unverified HTTPS request is being mad ...

  8. lua https request 调用

    网上资料 引用ssl.https 包 local https = require("ssl.https") 之后按同http一样调用. 但是,这种只最基本的实现了访问https服务 ...

  9. Username for 'https://github.com': remote: Invalid username or password. fatal: Authentication failed for 'https://github.com/GLSmile/pythontest.git/' 问题

    使用$ git push -u origin master 进行同步时,提示输入用户名和密码,但是我输入正确的信息后,仍然 会报Username for 'https://github.com': r ...

随机推荐

  1. Tomcat gzip果然强大,js文件压缩率50%以上

    Tomcat配置使用gzip,在server.xml中 <Connector port="9098" protocol="HTTP/1.1" connec ...

  2. ubuntu安装ssh服务记录

    执行命令: sudo apt-get install openssh-server 有时候会出现这个错误: unable to  fetch some archives ,maybe run apt- ...

  3. [Unity-6] GameObject有时候渲染不出来

    问题描写叙述:在做游戏的过程中遇到了这样一个问题.一个怪物,假设让他出如今屏幕的中央是没问题的,可是让他出如今屏幕的边缘的位置发现他没有出现. 问题原因:经过检查发现,我给这个GameObject加入 ...

  4. GetProcAddress 使用注意事项

    使用 GetProcAddress Function 时,有以下几点需要特别留意: 1. 第二个参数类型是 LPCSTR,不是 : 2. 用 __declspec(dllexport),按 C 名称修 ...

  5. 【PHP 】伪静态 - 4. 实际运用

    伪静态的实际运用 1. 在一个项目中有两个文件夹,public和private, public文件夹的图片可以被所有人访问,private只能被自己访问.如何实现? 第一个方法是: 在public和p ...

  6. rapidxml 节点加入另一个xml

    void TestRapidXml() { ]; sprintf(xmlContent,"<root><head>aaa</head><body&g ...

  7. docker入门——构建镜像

    前面我们已经介绍了如何拉取已经构建好的带有定制内容的Docker镜像,那么如何构建自己的镜像呢? 构建Docker镜像有以下两种方法: 使用docker commit命令. 使用docker buil ...

  8. Bootstrap3免费单页面模板-Shuffle

    在线演示 本地下载 这是一款当前最热门的模板,单页面模板现在越来越时兴,它简洁的页面和每一次滑动都带来的全新视角.非常值得收藏和使用!

  9. 【剑指offer】二分查找二维数组

    1 2 3 4 5 6 7 8 9 3 3 1 2 3 4 5 6 7 8 9 10 3 3 12 2 3 4 5 6 7 8 9 10 例子输出: Yes No No 时间限制:1 秒 内存限制:3 ...

  10. 用 Eclipse 插件提高代码质量

    如果能在构建代码前发现代码中潜在的问题会怎么样呢?很有趣的是,Eclipse 插件中就有这样的工具,比如 JDepend 和 CheckStyle,它们能帮您在软件问题暴露前发现这些问题.在 让开发自 ...