get HTML page using urllib
- urllib
urllib is a rather low level library. It comes standard with Python.
import urllib.request
# fh is like a filehandle
with urllib.request.urlopen('https://python.org/') as fh:
html = fh.read()
print(html)
Press ← or → to navigate between chapters
Press S or / to search in the book
Press ? to show this help
Press Esc to hide this help
urllib is a rather low level library. It comes standard with Python.
import urllib.request
# fh is like a filehandle
with urllib.request.urlopen('https://python.org/') as fh:
html = fh.read()
print(html)