From 001e9e377729b7d2bd3117f948c6e9d868555636 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Fri, 11 Oct 2024 16:59:03 +0200 Subject: [PATCH] Continued: - fixed exception: need to skip unwanted TLDs --- fba/networks/pleroma.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fba/networks/pleroma.py b/fba/networks/pleroma.py index 981e68d..c3d6322 100644 --- a/fba/networks/pleroma.py +++ b/fba/networks/pleroma.py @@ -128,6 +128,9 @@ def fetch_blocks(domain: str) -> list: if blocked in [None, ""]: logger.debug("blocked[%s]='%s' is empty after tidyup.domain(): domain='%s',block_level='%s' - SKIPPED!", type(blocked), blocked, domain, block_level) continue + elif not domain_helper.is_tld_wanted(blocked): + logger.debug("blocked='%s' is not wanted - SKIPPED!", blocked) + continue elif validators.domain(blocked, rfc_2782=True) and blacklist.is_blacklisted(blocked): logger.debug("blocked='%s' is blacklisted - SKIPPED!") continue -- 2.39.5