Pretty print JSON cache

Signed-off-by: Markus Birth <markus@birth-online.de>
This commit is contained in:
2026-05-13 13:36:27 +01:00
parent 0200e22eb5
commit b811d9d3c5
+1 -1
View File
@@ -73,7 +73,7 @@ class ClearSky():
else:
r = requests.get(url).json()
with open(cachefile, "wt") as f:
json.dump(r, f)
json.dump(r, f, indent=2)
sleep(0.20) # Poor man's way of making sure to not go over 5 requests per second
data_len = len(r["data"][data_key]) if data_key else len(r["data"])
result += r["data"][data_key] if data_key else r["data"]