import requests url = 'https://codegrepper.com/redirects/redirect_chain_allowed' response = requests.get(url) for redirect in response.history: print(redirect.url, redirect.status_code) print(response.url, response.status_code)