DEV Community

Discussion on: HTML Parser - Extract HTML information with ease

Collapse
 
chrisachard profile image
Chris Achard

Wow, BeautifulSoup makes that super easy! Do you ever find edge cases where it doesn't work well at all? Or does it manage to handle most sites that you've tried? Thanks!

Collapse
 
sm0ke profile image
Sm0ke • Edited

Hello @chris ,
Based on my experience, BS was failing when I didn't respect the syntax or something similar. I remember a dummy case when I initialized the BS object using lxlml parser and the saved HTML had always a closing tag:

Sample: <meta ...></meta>
It was my fault all the way :). Now I'm using html-parser to construct the BS objects.
Thank you for your interest.

Collapse
 
chrisachard profile image
Chris Achard

Ah, makes sense. Thanks!