示例#1
0
文件: Bot.py 项目: 4pr0n/spambot
	def handle_url(url, pages=1):
		children = []
		for child in Bot.get_content(url, pages=pages):
			if Filter.handle_child(child, Bot.db, Bot.log):
				# Filter removed the child for spam
				continue
			# Retry images if necessary
			Rarchives.rescrape(child, Bot.db, Bot.log)
			if Bot.db.count('checked_posts', 'postid = ?', [child.id]) == 0:
				# Has not been checked yet
				if not AmArch.handle_child(child, Bot.db, Bot.log):
					children.append(child)
				Bot.db.insert('checked_posts', (child.id, ))
				Bot.db.commit()
		return children