faqts : Computers : Programming : Languages : PHP : Common Problems : Files : Tips and Tricks

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

15 of 25 people (60%) answered Yes
Recently 6 of 10 people (60%) answered Yes

Entry

What are my options for HTML parsing?

Mar 2nd, 2000 10:49
Sean Blakey, Shae Erisson, Nathan Wallace, Python Library Reference http://www.python.org/doc/current/lib/lib.html


The Python Standard library includes an htmllib module which supports
HTML parsing.
To use this module, create a subclass of the htmllib.HTMLParser class. 
Within your subclass, define start_tag() and end_tag() methods for each
tag you wish to handle.  Feed data into your parser by calling the
feed() method.