python printing html code example Example: python print html as a string import requests page = requests.get(url) print(page.text.encode("utf8"))