"source_last_access" : 86400,
"misskey_limit" : 100,
"error_log_cleanup" : 604800,
- "write_error_log" : "true",
+ "write_error_log" : true,
"rss_limit" : 50,
"api_limit" : 500,
"theme" : "light",
- "allow_i2p_domain" : "false",
+ "allow_i2p_domain" : false,
"instances_social_api_key": "",
"max_crawl_depth" : 2000,
"min_peers_length" : 1000
elif block["blocked"].endswith(".onion"):
logger.debug("blocked='%s' is a TOR .onion domain - SKIPPED", block["blocked"])
continue
- elif block["blocked"].endswith(".i2p") and not config.get("allow_i2p_domain") == "true":
+ elif block["blocked"].endswith(".i2p") and not config.get("allow_i2p_domain"):
logger.debug("blocked='%s' is an I2P .onion domain - SKIPPED", block["blocked"])
continue
elif block["blocked"].endswith(".arpa"):
elif block["blocked"].endswith(".onion"):
logger.debug("blocked='%s' is a TOR onion domain name - SKIPPED!", block["blocked"])
continue
- elif block["blocked"].endswith(".i2p") and not config.get("allow_i2p_domain") == "true":
+ elif block["blocked"].endswith(".i2p") and not config.get("allow_i2p_domain"):
logger.debug("blocked='%s' is an I2P onion domain name - SKIPPED!", block["blocked"])
continue
elif block["blocked"].endswith(".arpa"):
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 not config.get("allow_i2p_domain") == "true":
+ elif domain.endswith(".i2p") and not config.get("allow_i2p_domain"):
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!")
elif domain.endswith(".onion"):
logger.debug("domain='%s' is a TOR .onion domain - setting False ...", domain)
wanted = False
- elif domain.endswith(".i2p") and not config.get("allow_i2p_domain") == "true":
+ elif domain.endswith(".i2p") and not config.get("allow_i2p_domain"):
logger.debug("domain='%s' is an I2P domain - setting False ...", domain)
wanted = False
elif domain.endswith(".tld"):
elif domain.endswith(".onion"):
logger.debug("domain='%s' is a TOR .onion domain - SKIPPED", domain)
continue
- elif domain.endswith(".i2p") and not config.get("allow_i2p_domain") == "true":
+ elif domain.endswith(".i2p") and not config.get("allow_i2p_domain"):
logger.debug("domain='%s' is an I2P .onion domain - SKIPPED", domain)
continue
elif domain.endswith(".arpa"):
if blacklist.is_blacklisted(domain):
raise ValueError(f"domain='{domain}' is blacklisted but function was invoked")
- elif config.get("write_error_log").lower() != "true":
+ elif not config.get("write_error_log"):
logger.debug("Writing to error_log is disabled in configuruation file - EXIT!")
return