From c57a6069f30ae6579ccfc254225b937f811d8ed9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Thu, 12 Sep 2024 01:29:52 +0200 Subject: [PATCH] Continued: - 'typeecho' sometimes provide a block list which has same API path as Fediverse instances provide, so let's add it as a source - removed nodeinfo_url from SQL query when searching for software during fetch_blocks() command --- fba/commands.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fba/commands.py b/fba/commands.py index 080b7ff..62dc297 100644 --- a/fba/commands.py +++ b/fba/commands.py @@ -294,17 +294,17 @@ def fetch_blocks(args: argparse.Namespace) -> int: # Re-check single software logger.debug("Querying database for args.software='%s' ...", args.software) database.cursor.execute( - "SELECT domain, software, origin, nodeinfo_url FROM instances WHERE software = ? AND nodeinfo_url IS NOT NULL ORDER BY total_blocks DESC, last_blocked ASC", [args.software] + "SELECT domain, software, origin, nodeinfo_url FROM instances WHERE software = ? ORDER BY total_blocks DESC, last_blocked ASC", [args.software] ) elif args.only_none: # Check only entries with total_blocked=None database.cursor.execute( - "SELECT domain, software, origin, nodeinfo_url FROM instances WHERE software IN ('pleroma', 'mastodon', 'lemmy', 'friendica', 'misskey', 'piefed') AND nodeinfo_url IS NOT NULL AND total_blocks IS NULL ORDER BY last_blocked ASC, total_blocks DESC" + "SELECT domain, software, origin, nodeinfo_url FROM instances WHERE software IN ('pleroma', 'mastodon', 'lemmy', 'friendica', 'misskey', 'piefed', 'typecho') AND nodeinfo_url IS NOT NULL AND total_blocks IS NULL ORDER BY last_blocked ASC, total_blocks DESC" ) else: # Re-check after "timeout" (aka. minimum interval) database.cursor.execute( - "SELECT domain, software, origin, nodeinfo_url FROM instances WHERE software IN ('pleroma', 'mastodon', 'lemmy', 'friendica', 'misskey', 'piefed') AND nodeinfo_url IS NOT NULL ORDER BY last_blocked ASC, total_blocks DESC" + "SELECT domain, software, origin, nodeinfo_url FROM instances WHERE software IN ('pleroma', 'mastodon', 'lemmy', 'friendica', 'misskey', 'piefed', 'typecho') AND nodeinfo_url IS NOT NULL ORDER BY last_blocked ASC, total_blocks DESC" ) rows = database.cursor.fetchall() -- 2.39.5