elif not instances.is_registered(domain):
raise Exception(f"domain='{domain}' is not registered but function is invoked.")
+ # Init variables
blockdict = list()
rows = None
else:
logger.warning("Cannot find 'mrf_simple_info' or 'quarantined_instances_info' in JSON reply: domain='%s'", domain)
+ logger.debug("found='%s'", found)
if not found:
logger.debug("Did not find any useable JSON elements, domain='%s', continuing with /about page ...", domain)
blocklist = fetch_blocks_from_about(domain)
elif not instances.is_registered(domain):
raise Exception(f"domain='{domain}' is not registered but function is invoked.")
- logger.debug("Fetching mastodon blocks from domain='%s'", domain)
+ # Init variables
doc = None
+
+ logger.debug("Fetching mastodon blocks from domain='%s'", domain)
for path in ["/instance/about/index.html"]:
try:
# Resetting doc type
blocked = line.find_all("td")[0].text
reason = line.find_all("td")[1].text
- logger.debug("blocked='%s',reason='%s'", blocked, reason)
+ logger.debug("blocked='%s',reason='%s' - BEFORE!", blocked, reason)
blocked = tidyup.domain(blocked) if blocked != "" else None
- reason = tidyup.reason(reason) if reason != "" else None
+ reason = tidyup.reason(reason) if reason != "" else None
logger.debug("blocked='%s',reason='%s' - AFTER!", blocked, reason)
if blocked in [None, ""]: