htmllib.py and parsing malformed HTML
nskhcarlso at bellsouth.net
Tue Sep 2 04:15:51 CEST 2003
I have written a parser using htmllib.HTMLParser and it functions fine
unless the HTML is malformed. For example, is some instances, the
provider of the HTML leaves out the <TR> tags but includes the </TR> tags.
Apparently, htmllib and more likely sgmllib do not parse an end tag if a
corresponding start tag was not found. Does anyone know a way to "fool"
the parser into handling the end tag is a start tag was not found?
More information about the Python-list