summaryrefslogtreecommitdiff
path: root/scraper/util.py
diff options
context:
space:
mode:
Diffstat (limited to 'scraper/util.py')
-rw-r--r--scraper/util.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/scraper/util.py b/scraper/util.py
index 05b01fa7..c7e18b44 100644
--- a/scraper/util.py
+++ b/scraper/util.py
@@ -67,12 +67,20 @@ def read_text(fn):
return f.read()
def read_json(fn):
+ #try:
with open(fn, 'r') as json_file:
return json.load(json_file)
+ #except:
+ # print("ERROR READING: {}".format(fn))
+ # return {}
def write_json(fn, data):
+ #try:
with open(fn, 'w') as outfile:
json.dump(data, outfile)
+ #except:
+ # print("ERROR WRITING: {}".format(fn))
+ # return {}
def write_report(fn, title=None, keys=None, rows=[]):
with open(fn, 'w') as f: