SHARE
TWEET

Untitled

Krenair Apr 1st, 2012 260 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class MyHTTPRedirectHandler(urllib2.HTTPRedirectHandler):
  2.     def redirect_request(self, req, fp, code, msg, headers, newurl):
  3.         request = urllib2.Request(newurl)
  4.         request.get_method = lambda: req.get_method()
  5.         return request
RAW Paste Data
Top