Examples of using the html parser

John J. Lee jjl at pobox.com
Sat Mar 6 17:53:12 EST 2004


Boogie El Aceitoso <frr149 at telefonica.net> writes:

> Were can I find examples of the usege of the html parser class?

Simpler to use, for simple cases:

http://wwwsearch.sf.net/pullparser/


Note that the example in the tarball that does something like

try:
    parser.get_compressed_text(endat=("endtag", "a"))
except NoMoreTokensError:
    ...

Is out of date: .get_text() and .get_compressed_text() now return an
empty string instead.


John



More information about the Python-list mailing list