Update scraper.py

This commit is contained in:
2026-10-10 23:47:10 +00:00
parent 0c0ef75304
commit d53bc87065
+7 -15
View File
@@ -10,22 +10,14 @@ import subprocess
ssh_key = "/key/location"
ssh_user= "theguy"
#dictionary defining servers, their ip and ssh port
#create dictionary defining servers, their ip and ssh port from json
try:
with open("/root/servers.json") as f:
servers = json.load(f)
except FileNotFoundError:
raise RuntimeError("servers json file not found")
servers = {
"server1": {
"ip": "1.2.3.4",
"port": 1
},
"server2": {
"ip": "5.6.7.8",
"port": 2
},
"fakelol": {
"ip": "200.200.200.200",
"port": 22222
},
}
#load previous state of servers, to avoid constant alert spam
try: