简体   繁体   中英

What's the best way to process HTML in Python?

我试图用Lettuce编写一些测试,开始使用lxml但是发现以Webrat与Rails集成的方式将其与Django集成有点复杂。

I use beautiful soup with django and no problems.

http://www.crummy.com/software/BeautifulSoup/

不知道lxml复杂的问题是什么(解析html会很复杂!),但是我一直使用Beautiful Soup来处理html,查找元素,构造树等。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM