Skip to content

Instantly share code, notes, and snippets.

@hironow
Last active January 2, 2016 19:49
Show Gist options
  • Save hironow/8352756 to your computer and use it in GitHub Desktop.
Save hironow/8352756 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
# coding: utf-8
import twitter
import tw_key
CONSUMER_KEY = tw_key.twdict['cons_key']
CONSUMER_SECRET = tw_key.twdict['cons_sec']
ACCESS_TOKEN_KEY = tw_key.twdict['accto_key']
ACCESS_TOKEN_SECRET = tw_key.twdict['accto_sec']
api = twitter.Api(consumer_key=CONSUMER_KEY,
consumer_secret=CONSUMER_SECRET,
access_token_key=ACCESS_TOKEN_KEY,
access_token_secret=ACCESS_TOKEN_SECRET)
tweets = api.GetSearch(term="#imas")
for tweet in tweets:
print(tweet.text)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment