]> git.mxchange.org Git - fba.git/blobdiff - fba/helpers/domain.py
Continued:
[fba.git] / fba / helpers / domain.py
index 4141258665c43c64e6acb2c3c39492961ad3ee51..2df92e8f9733005978e0f9ce5b6ce951009fc1c2 100644 (file)
@@ -76,6 +76,8 @@ def is_in_url(domain: str, url: str) -> bool:
         raise ValueError(f"Parameter url[]='{type(url)}' is not of type 'str'")
     elif url == "":
         raise ValueError("Parameter 'url' is empty")
+    elif not validators.url(url):
+        raise ValueError(f"Parameter url='{url}' is not a valid URL")
     elif domain + url in _cache["is_in_url"]:
         logger.debug("Returning cached is_in_url='%s' - EXIT!", _cache["is_in_url"][domain + url])
         return _cache["is_in_url"][domain + url]