Exemple #1
0
	def get(self):
		twitter = TwitterAuth()
		twitterapi = twitter.getAuth()
		tl = twitterapi.friends_timeline()
		#texts = ''
		results = []
		soup = TestSoup()
		for line in tl:
			# @、URL、Photo、RTなどの文字列を弾く
			text = self.deleteObstacle(line.text)
			result = soup.getFromY(text) # 配列が返ってくる
			for w in result:
				results.append(w)
		#for b in results:
		#	self.response.out.write(b)
		#	self.response.out.write('<br />')
		#self.response.out.write('-----------------------<br />')
		updateText = ''
		if len(results)!=0:
			results.sort()
			manylist = self.checkMany(results)
			if len(manylist)!=0:
				text = u'と'.join(manylist)
				updateText = u'%sが盛り上がってるかも!' % text
			else:
				updateText = u'(´・ω・`)うーん'
		else:
			updateText = u'(´・ω・`)あれ?'
		self.response.out.write(updateText)
		twitter.update(twitterapi,updateText)
Exemple #2
0
	def get(self):
		soup = TestSoup()
		keyphrase = soup.getKeyPhrase("")
		self.response.out.write(keyphrase)