What's the best way to parse HTML/XML with lxml in Python? or How do you handle large XML files effic

14 Replies, 1814 Views

"Is lxml python still the fastest HTML/XML parser? Or am I wasting my time?"

Seriously tho, I’ve been using lxml python for ages, and it’s *blazing* fast compared to the built-in stuff. But I keep hearing about newer libs popping up.

Anyone done recent benchmarks? Or is lxml still king for speed + features?

Also, why *is* it so much faster? Magic? Cython? Black magic?

(And yeah, I know BeautifulSoup is easier, but come on—speed matters when you’re scraping 10k pages.)

Thoughts? Hot takes? Or am I just old-school?

Messages In This Thread
What's the best way to parse HTML/XML with lxml in Python? or How do you handle large XML files effic - by - 01-07-2024, 02:11 AM



Users browsing this thread: 1 Guest(s)