only notify when there is a warning
This commit is contained in:
parent
d58d9811c6
commit
891ce89d2b
1 changed files with 2 additions and 2 deletions
2
main.py
2
main.py
|
@ -29,7 +29,7 @@ for day in ["heute", "morgen", "uebermorgen"]:
|
||||||
warnings = [tag.get_text() for tag in soup.find_all("p", class_="warnung_text")]
|
warnings = [tag.get_text() for tag in soup.find_all("p", class_="warnung_text")]
|
||||||
text = "\n".join(warnings)
|
text = "\n".join(warnings)
|
||||||
if day not in cache or text != cache[day]:
|
if day not in cache or text != cache[day]:
|
||||||
# if text:
|
if text:
|
||||||
notify(text)
|
notify(text)
|
||||||
cache[day] = text
|
cache[day] = text
|
||||||
print(text)
|
print(text)
|
||||||
|
|
Reference in a new issue