Created
September 25, 2014 04:47
-
-
Save Jach/90ebca18aaa1205697ec to your computer and use it in GitHub Desktop.
Print out all the retweets you made. Download your twitter data backup, go into the data/js/tweets folder and run this script.
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 glob | |
files = glob.glob('*.js') | |
data = {} | |
for f in files: | |
file = open(f) | |
_ = file.readline() | |
data[f] = json.loads(file.read()) | |
for d in data.values(): | |
for obj in d: | |
if 'retweeted_status' in obj: | |
print obj['retweeted_status']['user']['screen_name'] + ' said: ' + obj['retweeted_status']['text'] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment