From 85914c22ac84e33405dfec41a9d9aa3d246d5bfe Mon Sep 17 00:00:00 2001 From: Simon Junod Date: Tue, 31 Dec 2024 16:09:20 +0100 Subject: [PATCH] ... --- cambot/ephemeris.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cambot/ephemeris.py b/cambot/ephemeris.py index ce18857..d5deed1 100644 --- a/cambot/ephemeris.py +++ b/cambot/ephemeris.py @@ -49,8 +49,12 @@ def weather(lat, lon): j = json.loads(r.text) next_hours = [] - for i in (2, 8, 14): + for i in (0, 2, 4): hourly = j["list"][i] + print("l'index correspond à :") + print(hourly["dt"]) + print(hourly["dt_txt"]) + next_hours.append({"time": datetime.fromtimestamp(hourly["dt"]).strftime("%H:%M"), "emoji": weather_emoji(hourly["weather"][0]["id"]), "description": hourly["weather"][0]["description"],