News for hackers. Stuff that matters.
Re:Parsing HTML in Python with BeautifulSoup by rhymes on Monday November 09, 2009 @06:14AM (#930725)
The only problem with BeautifulSoup is that its kind of slow, but if it's fast enough for you go for it, otherwise you can try lxml with its lxml.html module. See also: http://blog.ianbicking.org/2008/03/30/python-html-parser-per...
Re:Parsing HTML in Python with BeautifulSoup by jamongkad on Monday November 09, 2009 @08:08AM (#930811)
Upvote I used to dig BeautifulSoup. It's latest release is slower than it's predecessors. That's why I use PyQuery nowadays, it's based on lxml and uses a jQuery like API to access the DOM.
Re:Parsing HTML in Python with BeautifulSoup by joshu on Monday November 09, 2009 @02:12PM (#931522)
I'm always terrified that these conversations will unearth a library or technique that will immediately obsolete most of the code in my current pet project.

Thanks!

Re:Parsing HTML in Python with BeautifulSoup by kingkilr on Monday November 09, 2009 @09:15AM (#930916)
I highly reccomend PyQuery. It's basically the jQuery API on top of lxml.
Re:Parsing HTML in Python with BeautifulSoup by euroclydon on Monday November 09, 2009 @11:08AM (#931133)
any chance of this running in IronPython?
Re:Parsing HTML in Python with BeautifulSoup by icey on Monday November 09, 2009 @11:18AM (#931152)
Don't quote me on this, but I believe you can get this running by way of IronClad. (AFAIK lxml doesn't run on IronPython without using IronClad right now.)

http://www.resolversystems.com/products/ironclad/

Re:Parsing HTML in Python with BeautifulSoup by natrius on Monday November 09, 2009 @02:28PM (#931560)
I forgot what BeautifulSoup couldn't do that made me look for something else, but I've been using html5lib for those purposes these days with good results, especially if you need to output modified HTML.