How can I get the final redirect URL when using urllib2.urlopen?

Viewed 35301

I'm using the urllib2.urlopen method to open a URL and fetch the markup of a webpage. Some of these sites redirect me using the 301/302 redirects. I would like to know the final URL that I've been redirected to. How can I get this?

4 Answers
Related