Help with regular expressions

Sybren Stuvel sybrenUSE at YOURthirdtower.imagination.com
Tue Aug 26 04:47:33 EDT 2003


dmbkiwi enlightened us with:
> A couple of other people have contributed code to this project,
> particularly relating to the parsing of the websites.
> Unfortunately, it is not parsing one particular part of the website
> properly.  This is because it is expecting the data to be in a
> certain form, and occasionally it is in a different form.
> Unfortunately this causes the entire script to fail to run.

You seem to expect old HTML. Why not use XHTML only ('tidy' can
convert between them) and use a regular XML parser? Much, much, much
easier! And you won't have to be afraid of messing up your regular
expressions ;-)

Sybren
-- 
The problem with the world is stupidity. Not saying there should be a
capital punishment for stupidity, but why don't we just take the
safety labels off of everything and let the problem solve itself? 




More information about the Python-list mailing list