Python Language Web scraping with Python Simple web content download with urllib.request


The standard library module urllib.request can be used to download web content:

from urllib.request import urlopen

response = urlopen('')    
data =

# The received bytes should usually be decoded according the response's character set
encoding =
html = data.decode(encoding)

A similar module is also available in Python 2.