I need to browse the DOM tree of a parsed HTML document.
I\'m using uTidyLib before parsing the string with lxml
a = tidy.parseString(html_code, options) dom
Beautiful Soup does a good job with invalid/broken HTML
>>> from BeautifulSoup import BeautifulSoup >>> soup = BeautifulSoup("hi>> print soup.prettify() hi 0 讨论(0) 查看其它2个回答 发布评论: 提交评论 加载中... 验证码 看不清? 提交回复 热议问题