I can't use the different proxy in Python.
My code:
import requests
proxies = {
"https":'https://154.16.202.22:3128',
"http":'http://154.16.202.22:3128'
}
r=requests.get('https://httpbin.org/ip', proxies=proxies)
print(r.json())
The error I'm getting is:
.
.
.
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='httpbin.org', port=443): Max retries exceeded with url: /ip (Caused by SSLError(SSLError(1, '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1122)')))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
.
.
.
requests.exceptions.SSLError: HTTPSConnectionPool(host='httpbin.org', port=443): Max retries exceeded with url: /ip (Caused by SSLError(SSLError(1, '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1122)')))
I executed pip install requests
.
I executed pip uninstall pyopenssl
, then tried to pip install
an old version of of pyopenssl but it didn't work.
Why is this not working?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…