mirror of
http://git.nowherejezfoltodf4jiyl6r56jnzintap5vyjlia7fkirfsnfizflqd.onion/nihilist/darknet-lantern.git
synced 2025-07-01 18:56:40 +00:00
uptimechecker if statement fix
This commit is contained in:
parent
4f1e6dbbc8
commit
8a01796db9
1 changed files with 36 additions and 37 deletions
|
@ -87,43 +87,42 @@ def main():
|
|||
index1 = url.find("http://")
|
||||
index2 = url.find("https://")
|
||||
|
||||
if url.startswith("smp://") or url.startswith("xftp://"):
|
||||
if RecognizeURLType(url) == 'smp':
|
||||
resp,resp_type,failed_response = send_server_checks(url)
|
||||
urltype = RecognizeURLType(url)
|
||||
if urltype == 'smp':
|
||||
resp,resp_type,failed_response = send_server_checks(url)
|
||||
|
||||
if resp_type in ["chatError", "contactSubSummary"]:
|
||||
resp, resp_type,failed_response = send_server_checks(url)
|
||||
if resp_type in ["chatError", "contactSubSummary"]:
|
||||
resp, resp_type,failed_response = send_server_checks(url)
|
||||
|
||||
if failed_response is None:
|
||||
print(url, "✔️")
|
||||
df.at[i, "Status"]="YES"
|
||||
if df.at[i, "Score"] < 100:
|
||||
df.at[i,"Score"] = df.at[i,"Score"] + 1
|
||||
else:
|
||||
print(url,"❌")
|
||||
df.at[i,"Status"]="NO"
|
||||
#if uptime >0 do -1 to the value
|
||||
if df.at[i,"Score"] > 0:
|
||||
df.at[i,"Score"] = df.at[i,"Score"] - 1
|
||||
if failed_response is None:
|
||||
print(url, "✔️")
|
||||
df.at[i, "Status"]="YES"
|
||||
if df.at[i, "Score"] < 100:
|
||||
df.at[i,"Score"] = df.at[i,"Score"] + 1
|
||||
else:
|
||||
print(url,"❌")
|
||||
df.at[i,"Status"]="NO"
|
||||
#if uptime >0 do -1 to the value
|
||||
if df.at[i,"Score"] > 0:
|
||||
df.at[i,"Score"] = df.at[i,"Score"] - 1
|
||||
|
||||
elif RecognizeURLType(url) == 'xftp':
|
||||
resp,resp_type,failed_response = send_server_checks(url)
|
||||
elif urltype == 'xftp':
|
||||
resp,resp_type,failed_response = send_server_checks(url)
|
||||
|
||||
if resp_type in ["chatError", "contactSubSummary"]:
|
||||
resp, resp_type,failed_response = send_server_checks(url)
|
||||
|
||||
if failed_response is None:
|
||||
print(url, "✔️")
|
||||
df.at[i, "Status"]="YES"
|
||||
if df.at[i, "Score"] < 100:
|
||||
df.at[i,"Score"] = df.at[i,"Score"] + 1
|
||||
else:
|
||||
print(url,"❌")
|
||||
df.at[i,"Status"]="NO"
|
||||
#if uptime >0 do -1 to the value
|
||||
if df.at[i,"Score"] > 0:
|
||||
df.at[i,"Score"] = df.at[i,"Score"] - 1
|
||||
if resp_type in ["chatError", "contactSubSummary"]:
|
||||
resp, resp_type,failed_response = send_server_checks(url)
|
||||
|
||||
if failed_response is None:
|
||||
print(url, "✔️")
|
||||
df.at[i, "Status"]="YES"
|
||||
if df.at[i, "Score"] < 100:
|
||||
df.at[i,"Score"] = df.at[i,"Score"] + 1
|
||||
else:
|
||||
print(url,"❌")
|
||||
df.at[i,"Status"]="NO"
|
||||
#if uptime >0 do -1 to the value
|
||||
if df.at[i,"Score"] > 0:
|
||||
df.at[i,"Score"] = df.at[i,"Score"] - 1
|
||||
|
||||
else:
|
||||
if index1 == -1 and index2 == -1:
|
||||
|
@ -144,14 +143,14 @@ def main():
|
|||
if df.at[i,"Score"] > 0:
|
||||
df.at[i,"Score"] = df.at[i,"Score"] - 1
|
||||
|
||||
except requests.ConnectionError as e:
|
||||
except requests.ConnectionError:
|
||||
#print(e)
|
||||
print(url,"❌")
|
||||
df.at[i,"Status"]="NO"
|
||||
#if uptime >0 do -1 to the value
|
||||
if df.at[i,"Score"] > 0:
|
||||
df.at[i,"Score"] = df.at[i,"Score"] - 1
|
||||
except requests.exceptions.ReadTimeout as e:
|
||||
except requests.exceptions.ReadTimeout:
|
||||
#print(e)
|
||||
print(url,"❌")
|
||||
df.at[i,"Status"]="NO"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue