The following code in Python, usually gives me the html of a website specified in the url variable. Urlopen works correctly. The problem: with a particular website from now I am no more able to make this code working.
from urllib.request import urlopen
url = "http://www.somewebsite.com"
html = urlopen(url)
print(html.read())
The error is the following:
File "C:/script.py", line 4, in <module>
html = urlopen(url)
[...]
File "C:\Python\Python35\lib\http\client.py", line 251, in _read_status
raise RemoteDisconnected("Remote end closed connection without"
http.client.RemoteDisconnected: Remote end closed connection without response