News for hackers. Stuff that matters.
Re:Parsing HTML in Python with BeautifulSoup by nvn1 on Monday November 09, 2009 @07:27AM (#930774)
Is there an equivalent library for PHP? It might save me a lot of time.
Re:Parsing HTML in Python with BeautifulSoup by qeorge on Monday November 09, 2009 @11:56AM (#931237)
Yes, try Simple HTML DOM:

http://simplehtmldom.sourceforge.net/

Its a little light on documentation, but has a familiar syntax and handles malformed HTML. I've used it in a number of projects and its been great.

Re:Parsing HTML in Python with BeautifulSoup by ojbyrne on Monday November 09, 2009 @07:41AM (#930789)
I don't think there is, but a way to workaround it is to use tidy to clean up malformed html, then use simplexml or another parser library.