Exemplo n.º 1
0
	def get(self):
		self.response.headers['Content-Type'] = 'text/plain'
		api = brains.t_con()
		
		for spec in configobject['lexicon']:
			for_me = api.search(configobject['my_handle'])
			results = brains.parse(spec, for_me)
			results = brains.select(results)
			for tweet in results:
				tweet.respond = True
				self.response.out.write('Tweeted\n')
				self.response.out.write(brains.send(brains.compose(tweet)).tariff_bot_says)
				self.response.out.write('\nIn response to:\n')
				self.response.out.write(tweet.text)
				self.response.out.write('\n')
				self.response.out.write('\n')
Exemplo n.º 2
0
    def get(self):
        self.response.headers['Content-Type'] = 'text/plain'
        api = brains.t_con()

        for spec in configobject['lexicon']:
            for_me = api.search(configobject['my_handle'])
            results = brains.parse(spec, for_me)
            results = brains.select(results)
            for tweet in results:
                tweet.respond = True
                self.response.out.write('Tweeted\n')
                self.response.out.write(
                    brains.send(brains.compose(tweet)).tariff_bot_says)
                self.response.out.write('\nIn response to:\n')
                self.response.out.write(tweet.text)
                self.response.out.write('\n')
                self.response.out.write('\n')
Exemplo n.º 3
0
	def get(self):
		self.response.headers['Content-Type'] = 'text/plain'
		api = brains.t_con()
		for spec in configobject['lexicon']:
			self.response.out.write('Twitter search for ' + spec['twitter_search_term'] + '\n')
			results = api.search(spec['twitter_search_term'])

			results = brains.parse(spec, results)

			results = brains.select(results, needhashtags = True)
			tweeted = []
			for result in results:
				self.response.out.write(u"found: " + unicode(results))
				result.respond = True #respond to everyone now.
				tweeted.append(brains.send(brains.compose(result)))
			
			for tweet in tweeted:
				self.response.out.write('Tweeted\n')
				self.response.out.write(tweet.tariff_bot_says)
				self.response.out.write('\nIn response to:\n')
				self.response.out.write(tweet.text)
				self.response.out.write('\n')
				self.response.out.write('\n')
Exemplo n.º 4
0
    def get(self):
        self.response.headers['Content-Type'] = 'text/plain'
        api = brains.t_con()
        for spec in configobject['lexicon']:
            self.response.out.write('Twitter search for ' +
                                    spec['twitter_search_term'] + '\n')
            results = api.search(spec['twitter_search_term'])

            results = brains.parse(spec, results)

            results = brains.select(results, needhashtags=True)
            tweeted = []
            for result in results:
                self.response.out.write(u"found: " + unicode(results))
                result.respond = True  #respond to everyone now.
                tweeted.append(brains.send(brains.compose(result)))

            for tweet in tweeted:
                self.response.out.write('Tweeted\n')
                self.response.out.write(tweet.tariff_bot_says)
                self.response.out.write('\nIn response to:\n')
                self.response.out.write(tweet.text)
                self.response.out.write('\n')
                self.response.out.write('\n')