Skip to content

Instantly share code, notes, and snippets.

@bricky149
Created October 18, 2016 10:20
Show Gist options
  • Save bricky149/ddc6c6f3f4c8997fd04b0835d6745d13 to your computer and use it in GitHub Desktop.
Save bricky149/ddc6c6f3f4c8997fd04b0835d6745d13 to your computer and use it in GitHub Desktop.
Script used to scrape Twitter users' locations from GPS-tagged tweets.
import json
from twython import Twython
CONSUMER_KEY = ''
CONSUMER_SECRET = ''
ACCESS_TOKEN = ''
ACCESS_TOKEN_SECRET = ''
twitter = Twython(CONSUMER_KEY, CONSUMER_SECRET, ACCESS_TOKEN, ACCESS_TOKEN_SECRET)
with open('dump.log', 'w') as file_:
file_.write(json.dumps(twitter.get_user_timeline(screen_name='')))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment