### Download url content
from urllib.request import urlretrieve
# URL address
url = 'http://archive.ics.uci.edu/ml/machine-learning-databases/wine-quality/winequality-white.csv'
# Download the content to a specified file
urlretrieve(url, 'filename.csv')
### Get request
from urllib.request import urlopen, Request
# URL address
url = "https://www.wikipedia.org/"
# Send Request to the url
request = Request(url)
# Save the response
response = urlopen(request)
# Read the response
html = response.read()
# Close activity
response.close()
######################## Alternative Way #################################
import requests
from bs4 import BeautifulSoup
# Send request to url and save the response
response = requests.get("http://somewebpage.com....")
# Get the text out of response as html
html_doc = response.text
# Parse the text as html
soup = BeautifulSoup(html_doc, 'html.parser')