HTMLParser : Record title tags. More info?

Paul Lim paullim at starhub.net.sg
Fri Oct 19 13:47:48 EDT 2001


Hi

I am a newbie in Python. I hope the guru can advise me.

I am trying to record the title of links in a html document. If the
opening tag has a title value, I need to record this value. If the title
does not exist, I need to record the text between the opening <A> and
closing </A>. Does anyone have any idea how should we do it?

I know I have to use
def start_a(self, attr):
and
 def end_a(self):

I would like to read more about the methods that can be used in
HTMLParser.
I have tried to read the python documentation but it is too brief and I
don't really understand how to utilize the methods. Is there any sites
where I can read more?

Thank you very much.

Sincerely
Paul







More information about the Python-list mailing list