text.py 文件源码

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

项目:anki-onenote-importer 作者: tmpethick 项目源码 文件源码
def html(message):
        """Returns the html of the message. If the message is multipart search for an
        attachment with no filename and with mimetype `text/html` and returns it.

        Parameters
        ----------
        message: email.message.Message
            Message to decode.

        Returns
        -------
        message_text: str
            Returns the html of the message. This method will try return the html
            encoded to `utf-8`. If it can't, returns it with its original encoding. If
            it can't find the text returns `None`.

        Raises
        ------
        TypeError
            If the parameter is not an instance of :class:`email.message.Message`.
        """
        return Text.decoded(message, ['text/html'])
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号