weixin_54791433
2021-01-23 19:05ProxyError: HTTPSConnectionPool: 报错各种方法都解决不了
import requests
import requests.auth
requests.DEFAULT_RETRIES = 5
s = requests.session()
s.keep_alive = False
client_auth = requests.auth.HTTPBasicAuth('bnnn,'.....')
post_data = {"grant_type": "password", "username": ".....", "password": "....."}
headers = {"User-Agent": "....."}
response = requests.post("http://www.reddit.com/api/v1/access_token", auth=client_auth, data=post_data, headers=headers, verify=False)
print(response.json())
完整报错是:
requests.exceptions.ProxyError: HTTPSConnectionPool(host='www.reddit.com', port=443): Max retries exceeded with url: /api/v1/access_token (Caused by ProxyError('Cannot connect to proxy.', FileNotFoundError(2, 'No such file or directory')))
纯小白提问~根据错误类型把网上能搜到的解决方法都试了个遍,为什么还是不行呀(像现在焦急崩溃),求好心人指点,感激不尽!
- 点赞
- 回答
- 收藏
- 复制链接分享
0条回答
为你推荐
- python requests使用代理一直报SSL错误,设置verify没有用
- python
- ssl
- 1个回答