@@ -82,8 +82,12 @@ class HTMLTextExtractor(HTMLParser):
82 self.tags.append(tag)
82 self.tags.append(tag)
84 def handle_endtag(self, tag):
84 def handle_endtag(self, tag):
85 if tag != self.tags[-1]:
88 if tag != self.tags[-1]:
86 raise Exception("invalid html")
89 raise Exception("invalid html")
87 self.tags.pop()
91 self.tags.pop()
89 def is_valid_tag(self):
93 def is_valid_tag(self):