我尝试使用此代理发出请求但仍然遇到同样的错误。
PaaS中的代理工作正常,但这些代理来自新的提供商,而且我的所有代理都遇到了这个问题。
import requests
proxies = {'http': 'http://104.153.47.242:1374', 'https': 'https://104.153.47.242:1374'}
r = requests.get('https://undefeated.com/products.json',proxies=proxies)
print (r.status_code)
错误:
Traceback (most recent call last):
File "proxtest.py", line 5, in <module>
r = requests.get('https://undefeated.com/products.json',proxies=proxies)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/requests/api.py", line 72, in get
return request('get', url, params=params, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/requests/api.py", line 58, in request
return session.request(method=method, url=url, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/requests/sessions.py", line 508, in request
resp = self.send(prep, **send_kwargs)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/requests/sessions.py", line 618, in send
r = adapter.send(request, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/requests/adapters.py", line 506, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError:
HTTPSConnectionPool(host='undefeated.com', port=443): Max retries exceeded with url: /products.json (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'ssl3_get_record', 'wrong version number')],)",),))
你能帮帮忙吗?