demo_requests_response_is_redirect.py:
import requests url = 'https://www.begtut.com/python/demopage.htm' x = requests.get(url) print(x.is_redirect)
➜ begtut>python demo_requests_response_is_redirect.py
False