get HTML page using requests


requests is the de-facto standard in Python for dealing with web pages as a web client.

examples/web-client/requests_get.py
import requests

res = requests.get('https://python.org/')
print(type(res))
print(res.status_code)
print(res.headers)
print(res.headers['content-type'])
# print(res.content)