continue
text = tidyup.domain(text.strip())
- logger.debug("text='%s'", text)
+ logger.debug("text='%s' - AFTER!", text)
if text in ["domain", "instance", "subdomain(s)", "block reason(s)"]:
logger.debug("Found header: '%s'=%d", text, cnt)
block_headers[cnt] = text
logger.debug("blocking()=%d", blocking)
for block in blocking:
logger.debug("block[]='%s'", type(block))
- block["blocked"] = tidyup.domain(block["blocked"])
+ if "blocked" not in block:
+ raise KeyError(f"block()={len(block)} does not have element 'blocked'")
+ block["blocked"] = tidyup.domain(block["blocked"]).encode("idna").decode("utf-8")
logger.debug("block[blocked]='%s' - AFTER!", block["blocked"])
+
if block["blocked"] == "":
logger.debug("block[blocked] is empty - SKIPPED!")
continue
elif not utils.is_domain_wanted(block["blocked"]):
- logger.warning("blocked='%s' is not wanted - SKIPPED!", block["blocked"])
+ logger.warning("block[blocked]='%s' is not wanted - SKIPPED!", block["blocked"])
continue
elif instances.is_recent(block["blocked"]):
- logger.debug("blocked='%s' has been recently checked - SKIPPED!", block["blocked"])
+ logger.debug("block[blocked]='%s' has been recently checked - SKIPPED!", block["blocked"])
continue
logger.info("Proccessing blocked='%s' ...", block["blocked"])