from urllib.request import urlopen page = urlopen("https://docs.python.org/3/howto/urllib2.html") contents = page.read()