From: Roland Häder Date: Thu, 12 Oct 2023 22:53:20 +0000 (+0200) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=79d33519562d0a153e879f2c79fa9b76e0f85302;p=fba.git Continued: - cut of any port part from `components.netloc` --- 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