Forum Discussion

skmayu's avatar
skmayu
Visitor
9 years ago

roUrlTransfer disable redirect

Hi
Wondering if someone can suggest me how to write this using roUrlTransfer. Following is the python code (xbmc)

class NoRedirection(urllib2.HTTPErrorProcessor):
   def http_response(self, request, response):
       return response
   https_response = http_response
   
def dsf (content_id):
    try:
        opener = urllib2.build_opener(NoRedirection)
        response = opener.open('some web site')
        html= response.read()
        #print html
No RepliesBe the first to reply