Here's my code:
import urllib2.request
response = urllib2.urlopen("http://www.google.com")
html = response.read()
print(html)
Any help?
pythonpython-3.xurllib2
Here's my code:
import urllib2.request
response = urllib2.urlopen("http://www.google.com")
html = response.read()
print(html)
Any help?
Best Answer
As stated in the
urllib2
documentation:So you should instead be saying
Your current, now-edited code sample is incorrect because you are saying
urllib.urlopen("http://www.google.com/")
instead of justurlopen("http://www.google.com/")
.