Created
October 15, 2010 19:18
-
-
Save hmason/628758 to your computer and use it in GitHub Desktop.
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 sys, os | |
import json | |
if __name__ == '__main__': | |
f = open("formatted_tweets.json") | |
data = f.read() | |
f.close() | |
tweets = json.loads(data) | |
for tweet in tweets: | |
try: | |
print tweet['text'] | |
except UnicodeEncodeError: | |
pass |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
from json import loads
if name == 'main':
with open("formatted_tweets.json") as f:
for tweet in loads(f.read()):
try:
print tweet['text']
except UnicodeEncodeError:
pass