Best HTML module?

Robert Citek rwcitek at uci.edu
Sun May 14 13:52:26 EDT 2000


My question is similar to Jason's.  Insead of replacing certain tags, I
would like to extract data from an HTML page.  The "Learning Python" book
has an example on p.265 that uses the string module to find and get the
information.  Using the string module and the re module for regular
expressions, I can get the information I want but the code is becoming
large, unsightly, and unwieldy.  Could the HTMLlib be used to do the same
thing?  Or is some other module better suited for extracting data from HTML
pages (if so, which module)?

Any pointers to examples of how to use the HTMLlib module, and pointers to
more appropriate modules greatly appreciated.

TIA,
- Robert

-----

At 06:42 PM 5/12/00 GMT, Jason Long wrote:
>Sorry if this is a silly question, but I'm Python newbie.  
>
>I would like to be able to take an HTML template file and replace
>certain tags or comments with data in my Python variables.  Is HTMLlib
>my best bet here?  Python.org mentions ZTemplate from the makers of Zope
>for tasks like this, but I couldn't find it on their site.





More information about the Python-list mailing list