diff options
Diffstat (limited to 'monitor/josef_reader.py')
| -rwxr-xr-x | monitor/josef_reader.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/monitor/josef_reader.py b/monitor/josef_reader.py index 736fb3d..c5755f1 100755 --- a/monitor/josef_reader.py +++ b/monitor/josef_reader.py @@ -8,6 +8,7 @@ import argparse import json from josef_leveldb import * from datetime import datetime as dt +import ast @@ -26,10 +27,10 @@ monitored_domains = [ "symantec.com", ] - +db = "./tmpdb/" if args.domain: - db = db_open() + # db = db_open() raw = db_lookup_domain(db, args.domain) else: print "No domain selected!" @@ -41,7 +42,7 @@ count_all = 0 for item in raw: # print item + '}', type(item) try: - entry = json.loads((item + '}').replace("'", '"')) + entry = ast.literal_eval(item) except: print (item + '}').replace("'", '"') # print entry, type(entry) |
