HTMLParser's start_tag method never called ?

Leif K-Brooks eurleif at ecritters.biz
Tue Feb 6 05:20:50 EST 2007


ychaouche wrote:
> class ParseurHTML(HTMLParser):
>     def __init__(self):
>         HTMLParser.__init__(self)
> 
>     def start_body(self,attrs):
>         print "this is my body"

def start_tag(self, name, attrs):
     if name == 'body':
         print "this is my body"



More information about the Python-list mailing list