Newby: How do I strip HTML tags?

netvegetable deathtospam43423 at
Sat Jun 8 03:19:52 EDT 2002

Andy McKay <amckay at> wrote in 
news:mailman.1023469751.21489.python-list at

>> This is a quite straight forward function: 
> This of course assumes that there are no "<" or ">" anywhere else in
> attributes etc...
> I would recommend using HTML Parser to get an accurate representation, or
> even stripogram which is pretty good (note it doesnt need Zope at all),
> although the html2text isnt perfect:
>>>> from stripogram import html2text html2text("<b>This is a
>>>> <i>test</i></b>") 'This is a test' 


Is there an "HTMLParser Tutorial for Dummies" anywhere on the web? 

netvegetable at

More information about the Python-list mailing list