blocked = tidyup.domain(tag.contents[0])
logger.debug("blocked='%s'", blocked)
- if not utils.is_domain_wanted(blocked):
+ if blocked == "":
+ logger.warning("blocked='%s' is empty after tidyup.domain() - SKIPPED!", tag.contents[0])
+ continue
+ elif not utils.is_domain_wanted(blocked):
logger.debug("blocked='%s' is not wanted - SKIPPED!", blocked)
continue
- logger.debug("Appending blocker='%s',blocked='%s',block_level='reject'", domain, blocked)
+ logger.debug("Appending blocker='%s',blocked='%s',block_level='reject' ...", domain, blocked)
blocklist.append({
"blocker" : domain,
"blocked" : blocked,
logger.debug("blocked='%s' - AFTER!", blocked)
if blocked == "":
- logger.warning("blocked is empty after tidyup.domain(): domain='%s',block_level='%s'", domain, block_level)
+ logger.warning("blocked is empty after tidyup.domain(): domain='%s',block_level='%s' - SKIPPED!", domain, block_level)
continue
elif not utils.is_domain_wanted(blocked):
logger.debug("blocked='%s' is not wanted - SKIPPED!", blocked)
logger.warning("Cannot find blocked='%s' in rows()=%d,domain='%s' - BREAK!", blocked, len(rows), domain)
break
- reason = rows[blocked]["reason"]
+ reason = tidyup.reason(rows[blocked]["reason"])
logger.debug("reason='%s'", reason)
if blocked == "":
reason = tidyup.reason(record["reason"])
logger.debug("blocked='%s',reason='%s' - AFTER!", blocked, reason)
- if blocked == "":
- logger.warning("blocked is empty after tidyup.domain(): domain='%s',block_level='%s'", domain, block_level)
- continue
- elif not utils.is_domain_wanted(blocked):
+ if not utils.is_domain_wanted(blocked):
logger.warning("blocked='%s' is not wanted - SKIPPED!", blocked)
continue
logger.debug("Invoking utils.deobfuscate_domain(%s, %s) ...", blocked, domain)
blocked = utils.deobfuscate_domain(blocked, domain)
+
logger.debug("blocked='%s' - DEOBFUSCATED!", blocked)
+ if not utils.is_domain_wanted(blocked):
+ logger.debug("blocked='%s' is not wanted - SKIPPED!", blocked)
+ continue
logger.debug("Appending blocker='%s',blocked='%s',reason='%s',block_level='%s' ...",domain, blocked, reason, block_level)
blockdict.append({