Created
April 21, 2015 21:53
-
-
Save stratosgear/298c61cf3decf8e62caf to your computer and use it in GitHub Desktop.
Nicely display Google history
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/python2 | |
import sys | |
import json | |
from datetime import datetime | |
if len(sys.argv) < 2: | |
print "Give me the json file to display!" | |
sys.exit(-1) | |
with open(sys.argv[1], 'r') as jsonFile: | |
searches = json.load(jsonFile) | |
for search in searches['event']: | |
when = datetime.fromtimestamp(int(search['query']['id'][0]['timestamp_usec']) / 1000000) | |
print u'{:%Y-%m-%d %H:%M:%S}: {}'.format(when, search['query']['query_text']) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Better viewer of the json files that you download from Google Search.
(according to http://venturebeat.com/2015/04/20/google-now-lets-you-export-your-search-history/)