From 101d5073f97eb020234fc5cb7d5402b372c2213b Mon Sep 17 00:00:00 2001 From: Dmytro Date: Thu, 16 May 2024 01:08:40 +0100 Subject: [PATCH] Add timeout to request.head --- proxy/endpoints.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proxy/endpoints.py b/proxy/endpoints.py index 3166380..2253d01 100644 --- a/proxy/endpoints.py +++ b/proxy/endpoints.py @@ -88,7 +88,7 @@ def url_ok(url) -> bool: try: r = requests.head(url, timeout=10) return bool(r.status_code) - except requests.exceptions.ConnectionError: + except requests.exceptions.RequestException: return False