Archived
1
0
Fork 0

only notify when there is a warning

This commit is contained in:
Lukas Winkler 2019-10-02 17:55:31 +02:00
parent d58d9811c6
commit 891ce89d2b
Signed by: lukas
GPG key ID: 54DE4D798D244853

View file

@ -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)