demo_requests_response_apparent_encoding.py:
import requests url = 'https://begtut.com/python/demopage.htm' x = requests.get(url) print(x.apparent_encoding)
➜ begtut>python demo_requests_response_apparent_encoding.py
ascii