Re: a html parse problem

2005-05-27 Thread bruno modulix
cheng wrote: > hi,all > > if the html like: > > > > if i use: > def handle_starttag(self, tag, attrs): > if tag == 'meta': >self.attr = attrs > self.headers += ['%s' % (self.attr)] > self.attr = '' > will get the output: > [('name', 'description'), (

a html parse problem

2005-05-27 Thread cheng
hi,all if the html like: if i use: def handle_starttag(self, tag, attrs): if tag == 'meta': self.attr = attrs self.headers += ['%s' % (self.attr)] self.attr = '' will get the output: [('name', 'description'), ('content', 'a test page')] [('name', 'keyw