是否有内置的程序包可将html解析为dom? [英] Is there a built in package to parse html into dom?
本文介绍了是否有内置的程序包可将html解析为dom?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我发现SAX的HTMLParser
和XML的xml.minidom
.我有一个格式良好的HTML,所以我不需要太强大的解析器-有什么建议吗?
I found HTMLParser
for SAX and xml.minidom
for XML. I have a pretty well formed HTML so I don't need a too strong parser - any suggestions?
推荐答案
看看 BeautifulSoup 一个>.它很流行,而且在解析HTML方面也很出色.
Take a look at BeautifulSoup. It's popular and excellent at parsing HTML.
这篇关于是否有内置的程序包可将html解析为dom?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文