From 79d33519562d0a153e879f2c79fa9b76e0f85302 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Fri, 13 Oct 2023 00:53:20 +0200 Subject: [PATCH] Continued: - cut of any port part from `components.netloc` --- fba/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fba/utils.py b/fba/utils.py index 6e46d60..6652c19 100644 --- a/fba/utils.py +++ b/fba/utils.py @@ -62,9 +62,9 @@ def fetch_url(url: str, headers: dict, timeout: tuple) -> requests.models.Respon # Invoke other function, avoid trailing ? logger.debug("components[%s]='%s'", type(components), components) if components.query != "": - response = network.fetch_response(components.netloc, f"{components.path}?{components.query}", headers, timeout) + response = network.fetch_response(components.netloc.split(":")[0], f"{components.path}?{components.query}", headers, timeout) else: - response = network.fetch_response(components.netloc, components.path if isinstance(components.path, str) and components.path != '' else '/', headers, timeout) + response = network.fetch_response(components.netloc.split(":")[0], components.path if isinstance(components.path, str) and components.path != '' else '/', headers, timeout) logger.debug("response[]='%s' - EXIT!", type(response)) return response -- 2.39.5