Skip to content

Instantly share code, notes, and snippets.

@kshepp
Last active August 29, 2015 14:21
Show Gist options
  • Save kshepp/63e3dee4cd1c42e96440 to your computer and use it in GitHub Desktop.
Save kshepp/63e3dee4cd1c42e96440 to your computer and use it in GitHub Desktop.
Scraping Twitter 2
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)
#MAKE THE QUERY TO TWITTER TO PULL THE DATA
user_timeline = t.search(q='@puremichigan', count=200)
for tweets in user_timeline['statuses']:
print tweets['text']+' | '
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment