Skip to content

Instantly share code, notes, and snippets.

@1stvamp
Created May 8, 2012 21:28
Show Gist options
  • Save 1stvamp/2639463 to your computer and use it in GitHub Desktop.
Save 1stvamp/2639463 to your computer and use it in GitHub Desktop.
Super simple tweet fetcher using python.
import json
import urllib2
username = 'ignorethecrane'
url = 'https://twitter.com/statuses/user_timeline/%s.json' % (username,)
u = urllib2.urlopen(url)
tweets = json.loads(u.read())
for item in tweets:
# Use the anatomy of a tweet page to find what can be item['bunged_in_here']
print '---'
print item['text']
print item['created_at']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment