SSL: WRONG_VERSION_NUMBER ON PYTHON REQUEST

**SSL: WRONG_VERSION_NUMBER ON PYTHON REQUEST**

在做微信公众号爬虫的时候遇到如下问题:

`requests.exceptions.SSLError: HTTPSConnectionPool(host='mp.weixin.qq.com', port=443):`

网上看到如下解决方法:

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

2.要是以上这些已安装还是继续报错,则在网页请求代码中加上这个 verify=False 就可以解决报错
但仍然没有解决我的问题

最后,加了个代理,端口8080,是我用的抓包软件fiddler的端口

`proxies = {'https': 'http://127.0.0.1:8080'}
content_json = requests.get(url, headers=headers, params=data1, proxies=proxies,verify=False).json()`

具体为什么,是个坑,以后填...

posted @ 2021-12-18 20:32  xiuga  阅读(206)  评论(0)    收藏  举报