]> git.mxchange.org Git - fba.git/blobdiff - fba/helpers/domain.py
Continued:
[fba.git] / fba / helpers / domain.py
index 39fbb7797acee74c7c5207ed0b3b60c507276b2f..86148928e405748613a914f241f93489aed216b5 100644 (file)
@@ -42,7 +42,7 @@ def raise_on(domain: str):
         raise ValueError(f"domain='{domain}' is not a valid domain")
     elif domain.endswith(".onion"):
         raise ValueError(f"domain='{domain}' is a TOR, please don't crawl them!")
-    elif domain.endswith(".i2p") and config.get("allow_i2p_domain") == "true":
+    elif domain.endswith(".i2p") and not config.get("allow_i2p_domain") == "true":
         raise ValueError(f"domain='{domain}' is an I2P, please don't crawl them!")
     elif domain.endswith(".arpa"):
         raise ValueError(f"domain='{domain}' is a domain for reversed IP addresses, please don't crawl them!")
@@ -97,7 +97,7 @@ def is_wanted(domain: str) -> bool:
     elif domain.endswith(".onion"):
         logger.debug("domain='%s' is a TOR .onion domain - setting False ...", domain)
         wanted = False
-    elif domain.endswith(".i2p") and config.get("allow_i2p_domain") == "true":
+    elif domain.endswith(".i2p") and not config.get("allow_i2p_domain") == "true":
         logger.debug("domain='%s' is an I2P domain - setting False ...", domain)
         wanted = False
     elif domain.endswith(".tld"):