def handle_endtag(self, tag):
     HTMLParser.handle_endtag(self, tag)
     # print 'handle endtag:', tag
     if tag == 'article':
         self.is_article = False
     elif tag == 'div':
         self.is_class = False
         self.is_state = False
Beispiel #2
0
	def handle_endtag(self, tag):
		HTMLParser.handle_endtag(self, tag)
		if tag == 'a':
			if self.anchortext:
				self.anchortext = self.anchortext.strip()
			if len(self.anchortext) > 0 and len(self.link) > 0:
				self.linklist.append([self.link, self.anchortext])

			self.link = ''
			self.anchortext = ''
Beispiel #3
0
 def handle_endtag(self, tag):
     HTMLParser.handle_endtag(self, tag)
Beispiel #4
0
 def handle_endtag(self, tag):
     HTMLParser.handle_endtag(self, tag)
     print('</' + tag + '>')
Beispiel #5
0
 def handle_endtag(self, tag):
     ''' 处理结束标签 '''
     HTMLParser.handle_endtag(self, tag)
     if not HTMLParser.get_starttag_text(self).endswith('/>'):
         print('</',tag,'>')
Beispiel #6
0
 def handle_endtag(self, tag):
     """处理结束标签"""
     HTMLParser.handle_endtag(self, tag)
     if not HTMLParser.get_starttag_text(self).endswith("/>"):
         print "</", tag, ">"
 def handle_endtag(self, tag):
     HTMLParser.handle_endtag(self, tag)
Beispiel #8
0
 def handle_endtag(self, tag):
     HTMLParser.handle_endtag(self, tag)
     # print 'handle endtag:', tag
     if tag == 'ul':
         self.is_class_list = False
Beispiel #9
0
 def handle_endtag(self, tag):
     """处理结束标签"""
     HTMLParser.handle_endtag(self, tag)
     if not HTMLParser.get_starttag_text(self).endswith("/>"):
         print "</",tag,">"
Beispiel #10
0
 def handle_endtag(self, tag):
     return HTMLParser.handle_endtag(self, tag)