models.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:munch-core 作者: crunchmail 项目源码 文件源码
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())
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号