Use urllib.getUrl ()
edit Sorry, I haven't done this for a while:
import urllib urllib.urlopen(url).geturl()
For example:
>>> f = urllib2.urlopen("http://tinyurl.com/oex2e") >>> f.geturl() 'http://www.amazon.com/All-Creatures-Great-Small-Collection/dp/B00006G8FI' >>>
Chris lacasse
source share