Re: Python3 html.parser

2014-03-18 Thread Peter Otten
balaji marisetti wrote: > Hi, > > I'm trying to parse a pice of HTML code using `html.parser` in Python3. > I want to find out the offset of a particular end tag (let's say ) and > then stop processing > the remaining HTML code immediately. So I wrote something like this. > > [code] > def handle

Python3 html.parser

2014-03-18 Thread balaji marisetti
Hi, I'm trying to parse a pice of HTML code using `html.parser` in Python3. I want to find out the offset of a particular end tag (let's say ) and then stop processing the remaining HTML code immediately. So I wrote something like this. [code] def handle_endtag(self, tag): if tag == mytag: