Best Practices for Parsing HTML with Python: What Tools and Libraries Do You Recommend?

20 Replies, 1488 Views

Wow, thanks for all the replies, everyone! This is super helpful.

I tried lxml based on your suggestions, and it’s definitely faster than BeautifulSoup. The syntax is a bit more complex, but I’m getting the hang of it.

I also gave `html5lib` a shot for messy HTML, and it worked like a charm. Thanks for the tip!

One quick follow-up: has anyone used Scrapy for *parsing html with python*? I’m curious if it’s worth learning for larger projects.

Cheers!

Messages In This Thread



Users browsing this thread: 1 Guest(s)