From e9fbef95c0d6ae183e7eb08a89a97f62dc9ee2cc Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 2 Feb 2021 15:45:40 +0000 Subject: [PATCH] Skip site active check for onion and i2p --- utils.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/utils.py b/utils.py index df27780b3..34c5773b4 100644 --- a/utils.py +++ b/utils.py @@ -1757,6 +1757,11 @@ def siteIsActive(url: str) -> bool: """ if not url.startswith('http'): return False + if '.onion/' in url or '.i2p/' in url or \ + url.endswith('.onion') or \ + url.endswith('.i2p'): + # skip this check for onion and i2p + return True try: req = urllib.request.Request(url) urllib.request.urlopen(req, timeout=10) # nosec