Created
March 23, 2013 20:35
-
-
Save mrngm/5229255 to your computer and use it in GitHub Desktop.
Dirty implementation for coffee container
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tweepy | |
cons_key="" | |
cons_sec="" | |
acc_token="" | |
acc_sec_t="" | |
auth = tweepy.OAuthHandler(cons_key, cons_sec) | |
auth.set_access_token(acc_token, acc_sec_t) | |
api = tweepy.API(auth) | |
for mention in api.mentions_timeline(): | |
print mention.user.screen_name | |
print mention.text | |
t = mention.text.split() | |
print t[1] | |
print ' '.join(t[3:]) | |
print "Interpreted as: COFCON" + t[1][-1] + ", message: "+' '.join(t[3:]) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment