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

20 Replies, 1326 Views

Why not both? I use python lxml for the heavy lifting (XPath queries ftw!) and drop into BS4 if the markup is trash.

Also, check out `parsel`—it’s like lxml but with CSS selectors. Best of both worlds? Maybe.

Docs are still a pain tho. 😅

Messages In This Thread



Users browsing this thread: 1 Guest(s)