# DEBUG: print(f"DEBUG: blocked='{blocked}'")
if not validators.domain(blocked):
- # DEBUG: print(f"DEBUG: blocked='{blocked}' is not a valid domain - SKIPPED!")
- continue
- elif blacklist.is_blacklisted(blocked):
- # DEBUG: print(f"DEBUG: blocked='{blocked}' is blacklisted - SKIPPED!")
+ print(f"WARNING: blocked='{blocked}' is not a valid domain - SKIPPED!")
continue
elif blocked.endswith(".arpa"):
print(f"WARNING: blocked='{blocked}' is a reversed .arpa domain and should not be used generally.")
elif blocked.endswith(".tld"):
print(f"WARNING: blocked='{blocked}' is a fake domain, please don't crawl them!")
continue
+ elif blacklist.is_blacklisted(blocked):
+ # DEBUG: print(f"DEBUG: blocked='{blocked}' is blacklisted - SKIPPED!")
+ continue
elif not instances.is_registered(blocked):
# DEBUG: print("DEBUG: Hash wasn't found, adding:", blocked, domain)
instances.add(blocked, domain, inspect.currentframe().f_code.co_name, nodeinfo_url)
elif blocked.endswith(".tld"):
print(f"WARNING: blocked='{blocked}' is a fake domain, please don't crawl them!")
continue
+ elif blacklist.is_blacklisted(blocked):
+ # DEBUG: print(f"DEBUG: blocked='{blocked}' is blacklisted - SKIPPED!")
+ continue
elif not instances.is_registered(blocked):
# DEBUG: print(f"DEBUG: Domain blocked='{blocked}' wasn't found, adding ..., domain='{domain}',origin='{origin}',nodeinfo_url='{nodeinfo_url}'")
instances.add(blocked, domain, inspect.currentframe().f_code.co_name, nodeinfo_url)
elif blocked.endswith(".tld"):
print(f"WARNING: blocked='{blocked}' is a fake domain, please don't crawl them!")
continue
+ elif blacklist.is_blacklisted(blocked):
+ # DEBUG: print(f"DEBUG: blocked='{blocked}' is blacklisted - SKIPPED!")
+ continue
elif not instances.is_registered(blocked):
# DEBUG: print("DEBUG: Hash wasn't found, adding:", blocked, domain)
instances.add(blocked, domain, inspect.currentframe().f_code.co_name, nodeinfo_url)
elif blocked.endswith(".tld"):
print(f"WARNING: blocked='{blocked}' is a fake domain, please don't crawl them!")
continue
+ elif blacklist.is_blacklisted(blocked):
+ # DEBUG: print(f"DEBUG: blocked='{blocked}' is blacklisted - SKIPPED!")
+ continue
elif not instances.is_registered(blocked):
# Commit changes
fba.connection.commit()
elif blocked.endswith(".tld"):
print(f"WARNING: blocked='{blocked}' is a fake domain, please don't crawl them!")
continue
+ elif blacklist.is_blacklisted(blocked):
+ # DEBUG: print(f"DEBUG: blocked='{blocked}' is blacklisted - SKIPPED!")
+ continue
elif not instances.is_registered(blocked):
# Commit changes
fba.connection.commit()
elif blocked.endswith(".tld"):
print(f"WARNING: blocked='{blocked}' is a fake domain, please don't crawl them!")
continue
+ elif blacklist.is_blacklisted(blocked):
+ # DEBUG: print(f"DEBUG: blocked='{blocked}' is blacklisted - SKIPPED!")
+ continue
elif not instances.is_registered(blocked):
# DEBUG: print(f"DEBUG: Domain blocked='{blocked}' wasn't found, adding ..., domain='{domain}',origin='{origin}',nodeinfo_url='{nodeinfo_url}'")
instances.add(blocked, domain, inspect.currentframe().f_code.co_name, nodeinfo_url)
elif blocked.endswith(".tld"):
print(f"WARNING: blocked='{blocked}' is a fake domain, please don't crawl them!")
continue
+ elif blacklist.is_blacklisted(blocked):
+ # DEBUG: print(f"DEBUG: blocked='{blocked}' is blacklisted - SKIPPED!")
+ continue
elif not instances.is_registered(blocked):
# DEBUG: print(f"DEBUG: Domain blocked='{blocked}' wasn't found, adding ..., domain='{domain}',origin='{origin}',nodeinfo_url='{nodeinfo_url}'")
instances.add(blocked, domain, inspect.currentframe().f_code.co_name, nodeinfo_url)