def html2markdown(html): """html is unicode""" if not html: return html h = html2text.HTML2Text() h.ignore_images = True h.ignore_links = True return h.handle(html)