extractors.py 文件源码

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

项目:alexandriadocs 作者: srtab 项目源码 文件源码
def strip_all(self, html):
        """
        Clean html content striping all html tags and removing all inline
        script and style.
        """
        try:
            cleaner = Cleaner(style=True, kill_tags=self.kill_tags)
            cleaned_html = cleaner.clean_html(html)
            text = strip_tags(cleaned_html).replace('¶', '')
        except ParserError:
            return ""
        return " ".join(text.split())
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号