From 27ccf4c5dadcd48f8ec274e8f0f42e710f0cc8b4 Mon Sep 17 00:00:00 2001 From: Mint <> Date: Fri, 9 Sep 2022 17:45:22 +0300 Subject: [PATCH] Domain unshielding for Friendica --- fetch_blocks.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/fetch_blocks.py b/fetch_blocks.py index fcf5d15..efbed2f 100644 --- a/fetch_blocks.py +++ b/fetch_blocks.py @@ -312,6 +312,16 @@ for blocker, software in c.fetchall(): for instance in blocks: blocked, reason = instance.values() blocked = tidyup(blocked) + + if blocked.count("*") > 0: + # Some friendica servers also obscure domains without hash + c.execute( + "select domain from instances where domain like ? order by rowid limit 1", (blocked.replace("*", "_"),) + ) + searchres = c.fetchone() + if searchres != None: + blocked = searchres[0] + c.execute( "select domain from instances where domain = ?", (blocked,) ) -- 2.39.5