24 lines
858 B
Python
24 lines
858 B
Python
import requests
|
|
import urllib3
|
|
urllib3.disable_warnings()
|
|
|
|
headers = {"User-Agent": "Mozilla/5.0"}
|
|
base = "https://homepage.snarfnet.net/api/services/proxy"
|
|
|
|
services = [
|
|
("GitOps & Automation", "Gitea", "repos"),
|
|
("GitOps & Automation", "ArgoCD", "applications"),
|
|
("Infrastructure & Observability", "Uptime Kuma", "status"),
|
|
("Infrastructure & Observability", "Grafana", "stats"),
|
|
("Environment & Weather", "Tempest Weather Station", "states"),
|
|
]
|
|
|
|
for group, svc, ep in services:
|
|
try:
|
|
url = f"{base}?group={requests.utils.quote(group)}&service={requests.utils.quote(svc)}&index=0&endpoint={ep}"
|
|
r = requests.get(url, headers=headers, verify=False, timeout=10)
|
|
print(f"[{group} -> {svc}] status: {r.status_code}, len: {len(r.text)}")
|
|
except Exception as e:
|
|
print(f"[{group} -> {svc}] Error: {e}")
|
|
|