Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class MyHTTPRedirectHandler(urllib2.HTTPRedirectHandler):
- def redirect_request(self, req, fp, code, msg, headers, newurl):
- request = urllib2.Request(newurl)
- request.get_method = lambda: req.get_method()
- return request
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement