def whereIsYadis(resp):
 content_type = resp.headers.get('content-type')
 if (content_type and (content_type.split(';', 1)[0].lower() == YADIS_CONTENT_TYPE)):
  return resp.final_url
 else:
  yadis_loc = resp.headers.get(YADIS_HEADER_NAME.lower())
  if (not yadis_loc):
   try:
    yadis_loc = findHTMLMeta(StringIO(resp.body))
   except MetaNotFound:
    pass
  return yadis_loc

def whereIsYadis ( resp ) : content_type = resp . headers . get ( 'content-type' ) if ( content_type and ( content_type . split ( ';' , 1 ) [ 0 ] . lower ( ) == YADIS_CONTENT_TYPE ) ) : return resp . final_url else : yadis_loc = resp . headers . get ( YADIS_HEADER_NAME . lower ( ) ) if ( not yadis_loc ) : try : yadis_loc = findHTMLMeta ( StringIO ( resp . body ) ) except MetaNotFound : pass return yadis_loc
given a httpresponse .