How to perform HTTP 303 redirect with urllib2 in Python?
How to perform HTTP 303 redirect with urllib2 in Python? Question: I have a URL to fetch, that gives a HTTP 303 redirect : import urllib2 as web import sys url=’http://sample.com’ try: handle=web.urlopen(url) except web.HTTPError, e: print e.code sys.exit(1) data=handle.read() print ‘Result :’ print data So, the above code prints 303 as a result, it’s …