Create pinger.py
Browse files
pinger.py
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import time
|
| 2 |
+
import requests
|
| 3 |
+
|
| 4 |
+
# Yahan wahi URL dalein jisme ye file rakhi hai
|
| 5 |
+
URL = "https://tfqdeadlo-1-78bapi.hf.space"
|
| 6 |
+
|
| 7 |
+
while True:
|
| 8 |
+
try:
|
| 9 |
+
requests.get(URL)
|
| 10 |
+
print(f"Pinged {URL} successfully!")
|
| 11 |
+
except Exception as e:
|
| 12 |
+
print(f"Error: {e}")
|
| 13 |
+
time.sleep(300) # 5 minute
|
| 14 |
+
|