fredrik at effbot.org
Sun Dec 31 04:48:48 EST 2000
HTML ParserDenis Voitenko wrote:
> I am trying to write an HTML parser. I am starting off with a simple
> one like so:
There's already an HTML parser in the standard library.
If you want to render HTML (e.g. to plain text), check out
the htmllib module. If you want to process HTML (filtering
tags, etc), it's usually easier to use the sgmllib module.
For examples, search for "sgmllib" and "htmllib" on deja.com
(or check my library guide).
If you still insist on writing your own, check the "sgmllib.py"
sources. It's harder than you think.
<!-- (the eff-bot guide to) the standard python library:
More information about the Python-list