cammiechat/cammiewatcher.py

9 lines
301 B
Python
Raw Normal View History

2024-09-29 17:31:19 +02:00
import requests
import time
while True:
data = requests.get("https://kelder.zeus.ugent.be/camera/api/info").json()
cammie_watchers = data['connections']['/']
r = requests.put('http://10.0.0.10/api/mailbox.json', json={'message':str(cammie_watchers), 'topic': 'cammie'})
time.sleep(1)