def mk_plaintext(self):
try:
h = html2text.HTML2Text()
h.ignore_images = True
h.inline_links = False
h.wrap_links = False
h.unicode_snob = True # Prevents accents removing
h.skip_internal_links = True
h.ignore_anchors = True
h.body_width = 0
h.use_automatic_links = True
h.ignore_tables = True
except html.parser.HTMLParseError as e:
raise WrongHTML(e)
return h.handle(self.mk_html())
评论列表
文章目录