News for hackers. Stuff that matters.
Re:Web Scraping 101 with Python by chewxy on Sunday March 10, 2013 @06:34PM (#5353844)
Only on wellformed pages. There are many many many many many malformed pages on the internet. Even those that are created in 2013
Re:Web Scraping 101 with Python by ville on Sunday March 10, 2013 @07:20PM (#5354021)
Fortunately HTML5 defined a standard way to parse even broken HTML and that parser is implemented in html5lib package. You can use it also with lxml and even use "jQuery like" selectors with lxml.cssselect (http://lxml.de/cssselect.html)