Home > other >  Crawler projects use proxy IP climb HTTPS site error, urgent urgent, ask ace glad. Error message: (S
Crawler projects use proxy IP climb HTTPS site error, urgent urgent, ask ace glad. Error message: (S

Time:11-18



Business code would only write four years of development, the distributed high concurrency also can't be a programmer? - & gt;>


The import requests

Https_ip_link="here is the proxy IP link"
Https_ip_list=requests. Get (https_ip_link) text. The split (" \ r \ n ")
Headers={
"The user-agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.139 Safari/537.36 "
}
For proxies in https_ip_list:
Proxies={" HTTPS ": {} 'http://201806091859344402:30494667@'. The format (proxies)}
The response=requests. Get (" https://www.baidu.com/", headers=headers, proxies=proxies, timeout=10)
Print (response. The decode ())
Test code, this is my creeper online, online, online, etc., and hope to solve this error or know why friend reply me, really thank you very much, very eager to know the solution,

Has been an error is as follows:
Traceback (most recent call last): File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35\lib\site-packages\urllib3\contrib\pyopenssl.py", line 441, in wrap_socket cnx.do_handshake() File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35\lib\site-packages\OpenSSL\SSL.py", line 1907, in do_handshake self._raise_ssl_error(self._ssl, result) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35\lib\site-packages\OpenSSL\SSL.py", line 1632, in _raise_ssl_error raise SysCallError(-1, "Unexpected EOF") OpenSSL.SSL.SysCallError: (-1, 'Unexpected EOF')
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35\lib\site-packages\urllib3\connectionpool.py", line 595, in urlopen self._prepare_proxy(conn) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35\lib\site-packages\urllib3\connectionpool.py", line 816, in _prepare_proxy conn.connect() File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35\lib\site-packages\urllib3\connection.py", line 326, in connect ssl_context=context) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35\lib\site-packages\urllib3\util\ssl_.py", line 329, in ssl_wrap_socket return context.wrap_socket(sock, server_hostname=server_hostname) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35\lib\site-packages\urllib3\contrib\pyopenssl.py", line 448, in wrap_socket raise ssl.SSLError('bad handshake: %r' % e) ssl.SSLError: ("bad handshake: SysCallError(-1, 'Unexpected EOF')",)
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35\lib\site-packages\requests\adapters.py", line 445, in send timeout=timeout File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35\lib\site-packages\urllib3\connectionpool.py", line 639, in urlopen _stacktrace=sys.exc_info()[2]) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35\lib\site-packages\urllib3\util\retry.py", line 388, in increment raise MaxRetryError(_pool, url, error or ResponseError(cause)) urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='www.baidu.com', port=443): Max retries exceeded with url:/(Caused by SSLError(SSLError("bad handshake: SysCallError(-1, 'Unexpected EOF')",),))
During handling of the above exception, another exception occurred:
Traceback (the most recent call last) : the File "E:/project_job/itslaw - spiders/trunk/QiChaCha/test/test. The py", line 14, the in & lt; module> response=requests.get("https://www.baidu.com/", headers=headers, proxies=proxies, timeout=10) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35\lib\site-packages\requests\api.py", line 72, in get return request('get', url, params=params, **kwargs) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35\lib\site-packages\requests\api.py", line 58, in request return session.request(method=method, url=url, **kwargs) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35\lib\site-packages\requests\sessions.py", line 512, in request resp=self.send(prep, **send_kwargs) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35\lib\site-packages\requests\sessions.py", line 622, in send r=adapter.send(request, **kwargs) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35\lib\site-packages\requests\adapters.py", line 511, in send raise SSLError(e, request=request) requests.exceptions.SSLError:HTTPSConnectionPool(host='www.baidu.com', port=443): Max retries exceeded with url:/(Caused by SSLError(SSLError("bad handshake: SysCallError(-1, 'Unexpected EOF')",),))

2 weeks I've been looking around for the solution to this problem, didn't find on the net, that cannot be resolved in the bowl and the nasty nasty nasty for master, thank you very much
My version control:
NDG - httpsclient 0.5.0
Pyasn1 0.4.3
PyOpenSSL 18.0.0
Requests 2.19.1
Urllib3 1.22
nullnull