I'm writing a script, to help me do some repetitive testing of a bunch of URLs.
I've written a python method in the script that it opens up the URL and sends a get request. I'm using Requests: HTTP for Humans -http://docs.python-requests.org/en/latest/- api to handle the http calls. 
There's the request.history that returns a list of status codes of the directs. I need to be able to access the particular redirects for those list of 301s. There doesn't seem to be a way to do this - to access and trace what my URLS are redirecting to. I want to be able to access the redirected URLS (status code 301) 
Can anyone offer any advice?
Thanks
Okay, I'm so silly. Here's the answer I was looking for 
r = requests.get("http://someurl")
r.history[1].url will return the URL
Python trace URL get requests - using python script