html5libHTML解析库

联合创作 · 2023-09-19 04:59

html5lib 是一个用来解析 HTML 文档的 Python 类库,支持HTML 5 以及最大程度兼容桌面浏览器。


主要特性包括:



  • Parses valid and invalid HTML documents to a tree

  • Support for minidom, ElementTree (including cElementTree and lxml.etree), BeautifulSoup and custom simpletree output formats

  • DOM to SAX converter

  • Reports parse errors

  • Character encoding detection

  • XML mode for working with illformed XML e.g. feeds

  • Filtering and serializing of trees

  • HTML+CSS sanitizer

  • Many unit tests

  • Faster than before :)

浏览 24
点赞
评论
收藏
分享

手机扫一扫分享

编辑 分享
举报
评论
图片
表情
推荐
点赞
评论
收藏
分享

手机扫一扫分享

编辑 分享
举报