Spaces:
Running
Running
Upload space_checker.py
Browse files- space_checker.py +13 -0
space_checker.py
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import requests
|
2 |
+
import time
|
3 |
+
import os
|
4 |
+
|
5 |
+
space_url = os.getenv('SPACE_URL')
|
6 |
+
|
7 |
+
def fetch_url(url):
|
8 |
+
response = requests.get(url)
|
9 |
+
print(response.text)
|
10 |
+
|
11 |
+
while True:
|
12 |
+
fetch_url(space_url)
|
13 |
+
time.sleep(60)
|