code: def resolve_redirects_if_needed(self, uri):
          
          if type(uri) == type("string") or type(uri) == type(u"unicode"):
  
              if uri.startswith("www."):  # support for lazy people
                  uri = "http://%s" % str(uri)
              if uri.startswith("http://"):
                  # headers = "Accept: application/rdf+xml"  # old way
                  headers = {'Accept': "application/rdf+xml"}
                  req = urllib2.Request(uri, headers=headers)
                  res = urllib2.urlopen(req)
                  uri = res.geturl()
  
          else:
              raise Exception("A URI must be in string format.")
  
          return uri
docs: substitute with final uri after 303 redirects (if it's a www location!)
          :param uri:
          :return: