[b]"What's the best way to build a parser HTML Python for web scraping?"[/b] or [b]"How to efficiently parse HTML

18 Replies, 1710 Views

"Best parser html python libs for web scraping? Need advice!"

Hey folks!

So I'm trying to scrape some sites, but man, the markup is *messy*. I've tried a few parser html python tools, but some are slow or just break on bad HTML.

What do y'all recommend? I’ve heard mixed things about BeautifulSoup (slow but forgiving?) and lxml (fast but strict?).

Also, any tips for handling those *ugh* malformed pages? Or should I just switch to something like parsel or pyquery?

Thanks in advance! 🙏

(ps: if you’ve got a fav tutorial or snippet, drop it pls!)

Messages In This Thread
[b]"What's the best way to build a parser HTML Python for web scraping?"[/b] or [b]"How to efficiently parse HTML - by - 03-11-2024, 12:41 AM



Users browsing this thread: 1 Guest(s)