解决python爬虫requests.exceptions.SSLError: HTTPSConnectionPool(host='XXX', port=443)问题

爬虫时报错如下:

requests.exceptions.SSLError: HTTPSConnectionPool(host=‘某某某网站‘, port=443):
Max retries exceeded with url: /login/ (Caused by SSLError(SSLError("bad handshake:
Error([(‘SSL routines‘, ‘tls_process_server_certificate‘, ‘certificate verify failed 

1.先检查pip有没安装cryptography,pyOpenSSL,certifi要是没有先安装
pip install cryptography
pip install pyOpenSSL
pip install certifi

(我是将上面的第三方包安装好后就不再报错了)

2.要是以上这些已安装还是继续报错,则在网页请求代码中加上这个 verify=False 就可以解决报错,代码可运行。

————————————————
原文链接:https://blog.csdn.net/weixin_44385104/article/details/94750593

解决python爬虫requests.exceptions.SSLError: HTTPSConnectionPool(host='XXX', port=443)问题

原文地址:https://www.cnblogs.com/wang-jx/p/12235679.html

时间: 2024-10-09 20:27:20

解决python爬虫requests.exceptions.SSLError: HTTPSConnectionPool(host='XXX', port=443)问题的相关文章

python使用requests时报错requests.exceptions.SSLError: HTTPSConnectionPool

requests.exceptions.SSLError: HTTPSConnectionPool(host='www.baidu.com', port=443): Max retries exceeded with url: / (Caused by SSLError(SSLError(1, u'[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:581)'),)) 错误提示就是上面这样的.首先我找了很多的资料,

requests.exceptions.SSLError: HTTPSConnectionPool报错解决方案

运行脚本报错: Traceback (most recent call last): File "F:/Interface_Study/study_requests/auto_get_post.py", line 24, in <module> res = Calendar_Query().request_main(url,'get',data) File "F:/Interface_Study/study_requests/auto_get_post.py&qu

python 访问网站时报错:requests.exceptions.SSLError: HTTPSConnectionPool

解决该错误的正确姿势是更新pyOpenSSL库.输入命令: 1 pip install pyopenssl 参见: https://github.com/requests/requests/issues/4246 原文地址:https://www.cnblogs.com/mcgill0217/p/10357003.html

requests.exceptions.SSLError……Max retries exceeded with url错误求助!!!

import requests head = {"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36", "Connection": "close"} html = requests.get("https://fa

python:接口请求中出现requests.exceptions.SSLError 和 InsecureRequestWarning的解决办法

1.在请求中加入verify=False,关闭认证---------解决requests.exceptions.SSLError 2.添加代码----------- 解决InsecureRequestWarning import urllib3 urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) 原文地址:https://www.cnblogs.com/erchun/p/12653525.html

pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host=&#39;files.pythonhosted.org&#39;, port=443): Read timed out.

用pip安装tornado库: python -m pip install tornado 出现问题一: Could not fetch URL https://pypi.org/simple/twisted/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/twis

错误:pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host=&#39;files.pythonhosted.org&#39;, port=443): Read timed out.

pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out. 上官瑾文 2018-07-26 14:57:34 浏览45376 python docker shell 镜像 Image pip read dockerfile ReadTimeoutError 场景 在用Dockerfile制作镜像的时候总是

python pip install 报:HTTPSConnectionPool(host=&#39;files.pythonhosted.org&#39;, port=443): Read timed out.错误

下午想要安装 scrapy框架时报错,如图: 网上查了一下:因为网络差导致安装超时,所以用安装时指定源的方法可以解决: pip install scrapy -i https://pypi.tuna.tsinghua.edu.cn/simple 红色的字体表示要安装的模块 python pip install 报:HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.错误 原文地址:https:/

Python 爬虫—— requests BeautifulSoup

本文记录下用来爬虫主要使用的两个库.第一个是requests,用这个库能很方便的下载网页,不用标准库里面各种urllib:第二个BeautifulSoup用来解析网页,不然自己用正则的话很烦. requests使用,1直接使用库内提供的get.post等函数,在比简单的情况下使用,2利用session,session能保存cookiees信息,方便的自定义request header,可以进行登陆操作. BeautifulSoup使用,先将requests得到的html生成BeautifulSo