- Check space API if open and how many ppl inside
commit
7a563de545
|
@ -0,0 +1,15 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
import requests
|
||||
import json
|
||||
|
||||
r = requests.get('https://spaceapi.syn2cat.lu/status/json')
|
||||
|
||||
obj = json.loads(r.text)
|
||||
|
||||
presence = obj["sensors"]["people_now_present"][0]["value"]
|
||||
|
||||
|
||||
if obj["state"]["open"]:
|
||||
print("And we are open!")
|
||||
print("There are {} Hackers present NOW!".format(presence))
|
Loading…
Reference in New Issue