Parsing HTML document, how?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • George K

    #1

    Parsing HTML document, how?

    This what my program should do, you give it the URL to a page and a
    template file, it downloads that page and then using the template file it
    returns some information.

    The way I thought of doing it was that the template file uses regex and
    then in my program I just do re.search(templ ate, htmlpage) and this would
    work but the HTML document has characters like ? and * that I need to
    escape in the template, so this solution doesn't work. What is a better
    way to accomplish what I want? does Python have any standard library for
    this?

    The parsing has to be dynamic, from the template file, the URLs are not
    fixed.



Working...