I have this simple code:
import requests
r = requests.get('https://yahoo.com')
print(r.url)
Which after executing, prints:
https://uk.yahoo.com/?p=us
I want to see:
How many redirects have happened before arriving on
https://uk.yahoo.com/?p=us
(clearly, there is redirect as I typedhttps://yahoo.com
originally)?I also want to save the content of each page, not only the last one. How to do this?