Skip to content

Instantly share code, notes, and snippets.

@shawnwall
Created May 11, 2012 03:54
Show Gist options
  • Save shawnwall/2657436 to your computer and use it in GitHub Desktop.
Save shawnwall/2657436 to your computer and use it in GitHub Desktop.
Python twitter json sample
#!/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