Follow redirects

Closes: #27
This commit is contained in:
Edward Betts 2020-06-30 11:06:46 +01:00
parent 52a7f94fd0
commit 298bef5c6b

View file

@ -67,7 +67,7 @@ def get_entity_with_cache(qid, refresh=False):
if not refresh and os.path.exists(filename): if not refresh and os.path.exists(filename):
entity = json.load(open(filename)) entity = json.load(open(filename))
else: else:
entity = get_entity(qid) entity = get_entity(qid, redirects=True)
json.dump(entity, open(filename, 'w'), indent=2) json.dump(entity, open(filename, 'w'), indent=2)
return entity return entity