def format_text(html):
text = html2text.html2text(html, bodywidth=0).replace('\n\n', '\n')
text = HTMLParser.HTMLParser().unescape(text)
text = strip_markdown.strip(text)
text = re.sub(' +\n', '\n', text).strip()
text = re.sub('\n\n\n', '\n\n', text)
return text
评论列表
文章目录