Skip to content

Instantly share code, notes, and snippets.

@mrngm
Created March 23, 2013 20:35
Show Gist options
  • Save mrngm/5229255 to your computer and use it in GitHub Desktop.
Save mrngm/5229255 to your computer and use it in GitHub Desktop.
Dirty implementation for coffee container
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