import requests html_code = requests.get('url')

Read more of this post