To get the resulting URL after the redirect, you can do r.url
.
r = requests.get('http://techtv.mit.edu/videos/1585-music-session-02/download.source') print(r.url)
r.history
for urls to the last, so it only returns the original url because you were redirected only once.
source share