Обновить dockerized/monitor.py

This commit is contained in:
mt77 2025-05-13 13:54:33 +05:00
parent 7fd538de7c
commit 4c0892995a

View File

@ -6,7 +6,7 @@ requests.packages.urllib3.disable_warnings(InsecureRequestWarning) # insecure wa
domains = os.getenv("TARGET_DOMAINS", "").split(',')
domains = [d.strip() for d in domains if d.strip()]
protocol = os.getenv("TARGET_PROTOCOL", "https://")
protocol = os.getenv("TARGET_PROTOCOL", "https")
verify_domain = bool(os.getenv("TARGET_SSL_VERIFY", "True"))
token = os.getenv("BOT_TOKEN", "")
chatid = int(os.getenv("BOT_CHATID", ""))
@ -20,7 +20,7 @@ timeout_domains = []
def CheckDomain(domain):
try:
r = requests.get(f"{protocol}{domain}", verify=verify_domain) # verify SSL crt disable
r = requests.get(f"{protocol}://{domain}", verify=verify_domain) # verify SSL crt disable
code = int(r.status_code)
return code
except requests.exceptions.ConnectionError: