urlopen urlib code example
Example 1: urllib python
#Used to make requests
import urllib.request
x = urllib.request.urlopen('https://www.google.com/')
print(x.read())
Example 2: urllib urlretrieve python 3
#In Python 3.x, the urlretrieve function is located in the urllib.request module:
from urllib.request import urlretrieve