def get_redirect_flv_stream_url(url):
 (host, path, params, query) = urlparse.urlparse(url)[1:5]
 try:
  conn = httplib.HTTPConnection(host)
  conn.request('HEAD', ((path + '?') + query))
  return conn.getresponse().getheader('location')
 except StandardError:
  return None

def get_redirect_flv_stream_url ( url ) : ( host , path , params , query ) = urlparse . urlparse ( url ) [ 1 : 5 ] try : conn = httplib . HTTPConnection ( host ) conn . request ( 'HEAD' , ( ( path + '?' ) + query ) ) return conn . getresponse ( ) . getheader ( 'location' ) except StandardError : return None
al qahera al youms server redirects a video url to a flv file location in most times .