From d1fab3f8e555ad188a21b70b1c5f683c6c12100c Mon Sep 17 00:00:00 2001 From: kiriharu Date: Tue, 5 Jan 2021 15:43:45 +0300 Subject: [PATCH] web check now use head method, close #7 --- apps/api/api/checkers/http.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/api/api/checkers/http.py b/apps/api/api/checkers/http.py index a651bf4..60abd46 100644 --- a/apps/api/api/checkers/http.py +++ b/apps/api/api/checkers/http.py @@ -27,8 +27,9 @@ class HttpChecker(BaseChecker): start_time = time.time() try: - request = self.session.get( - url + request = self.session.head( + url, + allow_redirects=True, ) # TODO: requests.exceptions.InvalidURL failed to parse exception except ConnectionError: