Import error: No module name urllib2 in python 3. Next Step?
Instead of your code you can use the below-mentioned code to get rid of import error:-
from urllib.request import urlopen
html = urlopen("http://www.google.com/").read()
print(html)