defhandle_starttag(self, tag, attributes): if tag != 'div': return if self.recording: self.recording += 1 return for name, value in attributes: if name == 'class'and value == 'title': break else: return self.recording = 1
defhandle_endtag(self, tag): if tag == 'div'and self.recording: self.recording -= 1
defhandle_data(self, data): if self.recording: # self.data.append(data) if ord(data[0]) != 13: self.data.append(data)