Example #1
0
class RssHandler:
	rssModel = None	
	
	def __init__(self):
		self.rssModel = RssModel()
		self.updateDataRss()
		
	##@brief Realiza uma busca sobre os links RSS
	def updateDataRss(self):
		parser = make_parser()
		parser.setContentHandler(RssModel())
		lenList = len(self.rssModel.getRssList())
		countRss = 1
			
		for url in self.rssModel.getRssList():
			if url == '':
				continue
			
			countRss += 1	
			per = 100 * countRss/ lenList
			os.system('clear')
			print "Buscando RSS... Total concluido: ", per, '%'
			try:	x
				infile = urlopen(url)
				parser.parse(infile)
			except:
Example #2
0
	def __init__(self):
		self.rssModel = RssModel()
		self.updateDataRss()