From 891ce89d2b2a74db141f15cc9ee7333d8a9c4c28 Mon Sep 17 00:00:00 2001 From: Lukas Winkler Date: Wed, 2 Oct 2019 17:55:31 +0200 Subject: [PATCH] only notify when there is a warning --- main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index 487a9ad..af38f14 100644 --- a/main.py +++ b/main.py @@ -29,8 +29,8 @@ for day in ["heute", "morgen", "uebermorgen"]: warnings = [tag.get_text() for tag in soup.find_all("p", class_="warnung_text")] text = "\n".join(warnings) if day not in cache or text != cache[day]: - # if text: - notify(text) + if text: + notify(text) cache[day] = text print(text)