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)
To know more about this you can have a look at the following video tutorial:-
Interested to learn more about Python? Come & join our Python course