Skip to content

Instantly share code, notes, and snippets.

@kshepp
Created April 21, 2015 17:32
Show Gist options
  • Save kshepp/4c5684ec9e04f4950242 to your computer and use it in GitHub Desktop.
Save kshepp/4c5684ec9e04f4950242 to your computer and use it in GitHub Desktop.
Scraping Twitter Statuses
import sys
import string
from twython import Twython
twitter = Twython('Insert Consumer Key Here',
'Insert Consumer Secret Key',oauth_version=2)
Access_token = twitter.obtain_access_token()
t = Twython('Insert Consumer Key', access_token=Access_token)
user_timeline = t.search(q='@puremichigan', count=20, include_rts=1)
for tweets in user_timeline['statuses']:
print tweets['text'] +"\n"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment