Any equivalent to Ruby's 'hpricot' html/xpath/css selector package?

Kenneth McDonald kenneth.m.mcdonald at sbcglobal.net
Sun Dec 28 18:22:47 EST 2008


Ruby has a package called 'hpricot' which can perform limited xpath  
queries, and CSS selector queries. However, what makes it really  
useful is that it does a good job of handling the "broken" html that  
is so commonly found on the web. Does Python have anything similar,  
i.e. something that will not only do XPath queries, but will do so on  
imperfect HTML? (A good HTML neatener would also be fine, of course,  
as I could then pass the result to a Python XPath package.)

And, what are people's favorite Python XPath solutions?

Thanks,
Ken McDonald



More information about the Python-list mailing list