I am trying to follow the redirect of a url using urllib2.

```
>>> import urllib2
>>> page=urllib2.urlopen('http://acer.com')
>>> print page.geturl()
http://www.acer.com/worldwide/selection.html
>>>page=urllib2.urlopen('http://www.acer.com/worldwide/selection.html')
>>> print page.geturl()
http://www.acer.com/worldwide/selection.html

```

But when I open `http://www.acer.com/worldwide/selection.html` in my browser it redirects to `http://us.acer.com/ac/en/US/content/home#_ga=1.216787925.232352975.1435019296` How to detect this redirection using urllib.
['https://Stackoverflow.com/questions/31021553', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2350219/']
`get_url()` doesn't work for all re-directs (for example JavaScript redirects)

What are you trying to achieve?

Something like [Selenium](https://pypi.python.org/pypi/selenium) with [PhantomJS](http://phantomjs.org/) as the backend might be more suited to this.

For screenshots you can then use [`save_screenshot()`](http://selenium-python.readthedocs.org/en/latest/api.html#selenium.webdriver.remote.webdriver.WebDriver.save_screenshot) which is part of Selenium Webdriver
Use `selenium` to get start. I'm using [chromedriver](https://sites.google.com/a/chromium.org/chromedriver/) as browser:

`from selenium.webdriver import Chrome
cr = Chrome()
cr.get(url)
cr.save_screenshot('IMAGE_NAME.png')`