problem with parsing: HTTPSConnectionPool
See original GitHub issueI am trying to parse several news webpages. I have no problem with them using requests.get, except with one website: www.redaccionmedica.com.
Expected Result
I would expect that requests.get() worked as expected, with no excepction.
Actual Result
However, this is what really happens when I try to get a webpage from that particular site:
Traceback (most recent call last):
File "/Users/tomasbaviera/PycharmProjects/Scienceflows/venv/lib/python3.5/site-packages/urllib3/connectionpool.py", line 601, in urlopen
chunked=chunked)
File "/Users/tomasbaviera/PycharmProjects/Scienceflows/venv/lib/python3.5/site-packages/urllib3/connectionpool.py", line 346, in _make_request
self._validate_conn(conn)
File "/Users/tomasbaviera/PycharmProjects/Scienceflows/venv/lib/python3.5/site-packages/urllib3/connectionpool.py", line 850, in _validate_conn
conn.connect()
File "/Users/tomasbaviera/PycharmProjects/Scienceflows/venv/lib/python3.5/site-packages/urllib3/connection.py", line 326, in connect
ssl_context=context)
File "/Users/tomasbaviera/PycharmProjects/Scienceflows/venv/lib/python3.5/site-packages/urllib3/util/ssl_.py", line 329, in ssl_wrap_socket
return context.wrap_socket(sock, server_hostname=server_hostname)
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/ssl.py", line 376, in wrap_socket
_context=self)
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/ssl.py", line 747, in __init__
self.do_handshake()
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/ssl.py", line 983, in do_handshake
self._sslobj.do_handshake()
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/ssl.py", line 628, in do_handshake
self._sslobj.do_handshake()
ssl.SSLError: [SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:645)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/tomasbaviera/PycharmProjects/Scienceflows/venv/lib/python3.5/site-packages/requests/adapters.py", line 440, in send
timeout=timeout
File "/Users/tomasbaviera/PycharmProjects/Scienceflows/venv/lib/python3.5/site-packages/urllib3/connectionpool.py", line 639, in urlopen
_stacktrace=sys.exc_info()[2])
File "/Users/tomasbaviera/PycharmProjects/Scienceflows/venv/lib/python3.5/site-packages/urllib3/util/retry.py", line 388, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='www.redaccionmedica.com', port=443): Max retries exceeded with url: /noticia/los-medicos-ven-legitimo-prescribir-homeopatia-pero-solo-si-lo-hacen-ellos-93938 (Caused by SSLError(SSLError(1, '[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:645)'),))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/tomasbaviera/PycharmProjects/Scienceflows/prueba_redaccion_medica.py", line 9, in <module>
r = requests.get(url)
File "/Users/tomasbaviera/PycharmProjects/Scienceflows/venv/lib/python3.5/site-packages/requests/api.py", line 72, in get
return request('get', url, params=params, **kwargs)
File "/Users/tomasbaviera/PycharmProjects/Scienceflows/venv/lib/python3.5/site-packages/requests/api.py", line 58, in request
return session.request(method=method, url=url, **kwargs)
File "/Users/tomasbaviera/PycharmProjects/Scienceflows/venv/lib/python3.5/site-packages/requests/sessions.py", line 508, in request
resp = self.send(prep, **send_kwargs)
File "/Users/tomasbaviera/PycharmProjects/Scienceflows/venv/lib/python3.5/site-packages/requests/sessions.py", line 640, in send
history = [resp for resp in gen] if allow_redirects else []
File "/Users/tomasbaviera/PycharmProjects/Scienceflows/venv/lib/python3.5/site-packages/requests/sessions.py", line 640, in <listcomp>
history = [resp for resp in gen] if allow_redirects else []
File "/Users/tomasbaviera/PycharmProjects/Scienceflows/venv/lib/python3.5/site-packages/requests/sessions.py", line 218, in resolve_redirects
**adapter_kwargs
File "/Users/tomasbaviera/PycharmProjects/Scienceflows/venv/lib/python3.5/site-packages/requests/sessions.py", line 618, in send
r = adapter.send(request, **kwargs)
File "/Users/tomasbaviera/PycharmProjects/Scienceflows/venv/lib/python3.5/site-packages/requests/adapters.py", line 506, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='www.redaccionmedica.com', port=443): Max retries exceeded with url: /noticia/los-medicos-ven-legitimo-prescribir-homeopatia-pero-solo-si-lo-hacen-ellos-93938 (Caused by SSLError(SSLError(1, '[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:645)'),))
Process finished with exit code 1
Reproduction Steps
The code executed is this one:
import requests
url = "http://www.redaccionmedica.com/noticia/los-medicos-ven-legitimo-prescribir-homeopatia-pero-solo-si-lo-hacen-ellos-93938"
r = requests.get(url)
I have tried also with this other code, but I got the same result:
import requests
url = "http://www.redaccionmedica.com/noticia/los-medicos-ven-legitimo-prescribir-homeopatia-pero-solo-si-lo-hacen-ellos-93938"
r = requests.get(url, Verify=False)
System Information
$ python -m requests.help
/usr/bin/python: No module named requests
My python version is 2.18.4, and I work with a Mac OSX. Any help would be appreciated very much. Thanks in advance.
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
problem with parsing: HTTPSConnectionPool #4615 - GitHub
I am trying to parse several news webpages. I have no problem with them using requests.get, except with one website: www.redaccionmedica.com ...
Read more >There is a problem parsing the package" while installing ...
I've only seen the parsing error when the android version on the device was lower than the version the app was compiled for....
Read more >snowsql Failed to Execute - Snowflake Community
Hi all,. New to Snowflake caveat! I am trying to connect from the command line for the first time and facing an error....
Read more >Troubleshooting — conan 1.55.0 documentation
ERROR: Missing prebuilt package¶. When installing packages (with conan install or conan create) it is possible that you get an error like the...
Read more >How to Fix Parse Error There was a Problem ... - YouTube
I'm gonna show How to Fix Parse Error There was a Problem Parsing the Package 2022 while installing android apps and apks.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m having trouble reproducing this, what version of python are you using?
That’s with Python 2.7.10 on MacOS High Sierra.
Perhaps their web server was temporarily having trouble with SSL.
Thank you very much for your clarifying comments, @sigmavirus24!!!