I have an url http://www.vbb.de/de/datei/GTFS_VBB_Nov2015_Dez2016.zip which "redirects" me to http://images.vbb.de/assets/ftp/file/286316.zip. Redirect in quotes because python says there is no redirect:
In : response = requests.get('http://www.vbb.de/de/datei/GTFS_VBB_Nov2015_Dez2016.zip')
...: if response.history:
...: print "Request was redirected"
...: for resp in response.history:
...: print resp.status_code, resp.url
...: print "Final destination:"
...: print response.status_code, response.url
...: print "Request was not redirected"
Request was not redirected
Status Code is also 200.
response.history gives nothing.
response.url gives the first url and not the real one. But it's possible to get the real url in firefox -> developer tools -> network. How do I make in python 2.7? Thanks in advance!!