From 11b4184f0053e2eea518bda5176206a8dece7cd7 Mon Sep 17 00:00:00 2001 From: bashrc Date: Fri, 28 Aug 2026 13:49:07 +0100 Subject: [PATCH] Skip site active check for yggdrasil --- src/siteactive.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/siteactive.py b/src/siteactive.py index 1ed8a9d9f..f9da61c23 100644 --- a/src/siteactive.py +++ b/src/siteactive.py @@ -14,6 +14,7 @@ import socket from urllib.parse import urlparse from src.utils import data_dir from src.utils import string_starts_with +from src.utils import is_yggdrasil_address from src.data import load_string from src.data import save_string @@ -115,6 +116,13 @@ def site_is_active(url: str, timeout: int, url.endswith('.i2p'): # skip this check for onion and i2p return True + if 'http://' in url: + domain = url.split('://')[1] + if '/' in domain: + domain = domain.split('/')[0] + if is_yggdrasil_address(domain): + # skip this check for yggdrasil + return True loc = _site_active_parse_url(url) result = Result(url=url) @@ -197,5 +205,6 @@ def is_online(host: str = "8.8.8.8", socket.socket(socket.AF_INET, socket.SOCK_STREAM).connect((host, port)) return True except socket.error as ex: - print(ex) + msg = str(ex).replace('\n', ' ') + print('OFFLINE: ' + msg) return False