htmllib question - Is this the best tool for my task?
chris patti
cpatti at black-racer.atg.com
Wed Jan 5 17:09:56 EST 2000
feoh at cosmic.com writes:
> Folks;
>
> I have a task where I need to figure out if certain HTML tags (Rather
> Java Server Pages tags, but they're still HTML, kinda :) contain certain
> things in an HTML document I'd feed to the script.
>
> I'm thinking htmllib is the right tool for this task, am I wrong?
>
> So as far as I understand things thus far, I should subclass HTMLParser,
> define start_java and end_java tag functions.. But where from there?
>
> How do I get a hold of the text within the tag I'm processing? None of
> this is clear from the htmllib doc.
>
> Thanks!
> -Chris P.
To answer my own question - I ended up using regexps for this.
htmllib was overkill.
-Chris
More information about the Python-list
mailing list