What's the best way to parse HTML with Python lxml? or Python lxml vs. BeautifulSoup – which one do y

20 Replies, 1342 Views

Lxml all day! The speed is insane, and once you memorize the XPath syntax, you’ll never go back.

BS4 feels like training wheels in comparison. But hey, if you’re just doing quick-and-dirty scrapes, it’s fine.

Pro tip: Use `lxml.html.fromstring()`—it’s more forgiving than the default parser.

Messages In This Thread



Users browsing this thread: 1 Guest(s)