def urlresolve(url):
 res = urlget(url, stream=True, allow_redirects=False)
 if ((res.status_code == 302) and ('location' in res.headers)):
  return res.headers['location']
 else:
  return url

def urlresolve ( url ) : res = urlget ( url , stream = True , allow_redirects = False ) if ( ( res . status_code == 302 ) and ( 'location' in res . headers ) ) : return res . headers [ 'location' ] else : return url
this function is deprecated .