Re: Noob trying to parse bad HTML using xml.etree.ElementTree

2012-12-30 Thread Peter Otten
Morten Guldager wrote: > 'Aloha Friends! > > I'm trying to process some HTML using xml.etree.ElementTree > Problem is that the HTML I'm trying to read have some not properly closed > tags, as the shown in line 8 below. > > 1 from xml.etree import ElementTree > 2 > 3 tree = ElementTree >

Re: Noob trying to parse bad HTML using xml.etree.ElementTree

2012-12-30 Thread Chris Angelico
On Sun, Dec 30, 2012 at 8:52 PM, Morten Guldager wrote: > Question is if it's possible to tweak xml.etree.ElementTree to accept, and > understand sloppy html, or if you have suggestions for similar easy to use > framework, preferably among the included batteries? > Check out BeautifulSoup, it's f