Created
May 11, 2012 03:54
-
-
Save shawnwall/2657436 to your computer and use it in GitHub Desktop.
Python twitter json sample
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
#!/usr/bin/env python | |
import urllib2 | |
import json | |
result = json.load(urllib2.urlopen('http://api.twitter.com/1/trends/daily.json')) | |
for date,trends in result['trends'].iteritems(): | |
print date | |
for trend in trends: | |
print trend['query'] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment