Python problem parsing html?

Graham

New member
Hi guys I am using sgmllib for python and my code parses the href tags to print out the hyper link however I need to also print out the text between tags. Does anyone know how to do this? my href code is:
def start_a(self, attributes):
for v in attributes:
if v[0]=="href":
print v[1]

I have tried using the def handle_data but I have no idea how to use this and online documentation is not very useful
 
Back
Top