Created
May 10, 2011 11:17
-
-
Save gearmonkey/964289 to your computer and use it in GitHub Desktop.
grab a tweet and push it to the mm sentiment analyzer
This file contains hidden or 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
| #grab some data from twitter | |
| data = loads(urllib2.urlopen("http://api.twitter.com/1/statuses/show/{0}.json".\ | |
| format(twitter_id)).read()) | |
| tweet_content = data["text"] | |
| #push to sentiment analysis | |
| raw_senti = loads(urllib2.urlopen(\ | |
| "http://apib1.semetric.com/musicmetric/sentiment?token="+\ | |
| API_KEY, data = tweet_content).read()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment