def findHTMLMeta(stream):
 parser = YadisHTMLParser()
 chunks = []
 while 1:
  chunk = stream.read(CHUNK_SIZE)
  if (not chunk):
   break
  chunks.append(chunk)
  try:
   parser.feed(chunk)
  except HTMLParseError as why:
   chunks.append(stream.read())
   break
  except ParseDone as why:
   uri = why[0]
   if (uri is None):
    chunks.append(stream.read())
    break
   else:
    return uri
 content = ''.join(chunks)
 raise MetaNotFound(content)

def findHTMLMeta ( stream ) : parser = YadisHTMLParser ( ) chunks = [ ] while 1 : chunk = stream . read ( CHUNK_SIZE ) if ( not chunk ) : break chunks . append ( chunk ) try : parser . feed ( chunk ) except HTMLParseError as why : chunks . append ( stream . read ( ) ) break except ParseDone as why : uri = why [ 0 ] if ( uri is None ) : chunks . append ( stream . read ( ) ) break else : return uri content = '' . join ( chunks ) raise MetaNotFound ( content )
look for a meta http-equiv tag with the yadis header name .