diff --git a/main.py b/main.py new file mode 100644 index 0000000..a70487e --- /dev/null +++ b/main.py @@ -0,0 +1,15 @@ +import requests +import time +import notify2 + +notify2.init("ICE") +current = 0 +while True: + result = requests.get("https://iceportal.de/api1/rs/status") + speed = result.json()["speed"] + if speed != 0: + if current != speed: + n = notify2.Notification("ICE SPEED UPDATE", "new ICE speed: %s km/h" % speed) + n.show() + current = speed + time.sleep(1)