Created
May 8, 2012 21:28
-
-
Save 1stvamp/2639463 to your computer and use it in GitHub Desktop.
Super simple tweet fetcher using python.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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