]> git.mxchange.org Git - fba.git/blobdiff - fba/utils.py
Continued:
[fba.git] / fba / utils.py
index 6e46d60c6c0d2c7a3506554863f85bc2ce3bd9c8..8244a78a1cce162e056e235e8244ad3fcb3f5235 100644 (file)
@@ -62,9 +62,19 @@ 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