]> git.mxchange.org Git - fba.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Thu, 12 Oct 2023 22:53:20 +0000 (00:53 +0200)
committerRoland Häder <roland@mxchange.org>
Thu, 12 Oct 2023 22:53:20 +0000 (00:53 +0200)
- cut of any port part from `components.netloc`

fba/utils.py

index 6e46d60c6c0d2c7a3506554863f85bc2ce3bd9c8..6652c19261e7747d268f5213d3d220e207f1af14 100644 (file)
@@ -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