def html2text(self, unicode_html_source):
    """Expects unicode; returns unicode"""
return Popen([self.lynx, '-assume-charset=UTF-8', '-display-charset=UTF-8',
    '-dump', '-stdin'], stdin=PIPE, stdout=PIPE).communicate(input=
    unicode_html_source.encode('utf-8'))[0].decode('utf-8')
Python strategy for extracting text from malformed html pages