from fba import fba
from fba import network
+from fba.helpers import cookies
from fba.helpers import locking
from fba.helpers import tidyup
print("WARNING: blocker is now empty!")
continue
elif nodeinfo_url is None or nodeinfo_url == "":
- print(f"DEBUG: blocker='{blocker}',software='{software}' has empty nodeinfo_url")
+ # DEBUG: print(f"DEBUG: blocker='{blocker}',software='{software}' has empty nodeinfo_url")
continue
elif blacklist.is_blacklisted(blocker):
print(f"WARNING: blocker='{blocker}' is blacklisted now!")
raise ValueError(f"Parameter command[]='{type(command)}' is not 'str'")
elif command == "":
raise ValueError("Parameter 'command' is empty")
- elif domain.endswith(".arpa"):
- print(f"WARNING: domain='{domain}' is a reversed .arpa domain and should not be used generally.")
- return
elif not validators.domain(domain.split("/")[0]):
raise ValueError(f"domain='{domain}' is not a valid domain")
elif domain.endswith(".arpa"):
elif blacklist.is_blacklisted(instance):
# DEBUG: print("DEBUG: instance is blacklisted:", instance)
continue
-
- # DEBUG: print("DEBUG: Handling instance:", instance)
- if instance.endswith(".arpa"):
- print(f"WARNING: instance='{instance}' is a reversed .arpa domain and should not be used generally.")
- continue
elif instance.find("/profile/") > 0 or instance.find("/users/") > 0:
# DEBUG: print(f"DEBUG: instance='{instance}' is a link to a single user profile - SKIPPED!")
continue
if components.scheme == "" and components.netloc == "":
# DEBUG: print(f"DEBUG: link[href]='{link['href']}' has no scheme and host name in it, prepending from domain='{domain}'")
url = f"https://{domain}{url}"
+ components = urlparse(url)
+
+ if blacklist.is_blacklisted(components.netloc):
+ print(f"WARNING: components.netloc='{components.netloc}' is blacklisted - SKIPPED!")
+ continue
+ elif not validators.domain(components.netloc):
+ print(f"WARNING: components.netloc='{components.netloc}' is not a valid domain - SKIPPED!")
+ continue
# DEBUG: print("DEBUG: Fetching nodeinfo from:", url)
data = network.fetch_api_url(