From fb7954868ff3aef234bf424b917ac8fe89823297 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Thu, 2 Nov 2023 05:35:25 +0100 Subject: [PATCH] Continued: - added missing parameter for SQL queries - added some aliases for misskey --- fba/commands.py | 4 ++-- fba/helpers/software.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/fba/commands.py b/fba/commands.py index df6677f..77de357 100644 --- a/fba/commands.py +++ b/fba/commands.py @@ -1470,10 +1470,10 @@ def update_nodeinfo(args: argparse.Namespace) -> int: database.cursor.execute("SELECT domain, software FROM instances WHERE domain = ? LIMIT 1", [args.domain]) elif args.software is not None and args.software != "": logger.info("Fetching domains for args.software='%s'", args.software) - database.cursor.execute("SELECT domain, software FROM instances WHERE software = ? ORDER BY last_updated ASC") + database.cursor.execute("SELECT domain, software FROM instances WHERE software = ? ORDER BY last_updated ASC", [args.software]) elif args.mode is not None and args.mode != "": logger.info("Fetching domains for args.mode='%s'", args.mode.upper()) - database.cursor.execute("SELECT domain, software FROM instances WHERE detection_mode = ? ORDER BY last_updated ASC") + database.cursor.execute("SELECT domain, software FROM instances WHERE detection_mode = ? ORDER BY last_updated ASC", [args.mode]) elif args.no_software: logger.info("Fetching domains with no software type detected ...") database.cursor.execute("SELECT domain, software FROM instances WHERE software IS NULL ORDER BY last_updated ASC") diff --git a/fba/helpers/software.py b/fba/helpers/software.py index 29da2b6..50e9402 100644 --- a/fba/helpers/software.py +++ b/fba/helpers/software.py @@ -50,7 +50,7 @@ def alias(software: str) -> str: elif software in ["hometown", "ecko", "fedibird", "glitchcafe"] or "되는 마스토돈" in software or "mastodon" in software: logger.debug("Setting mastodon: software='%s'", software) software = "mastodon" - elif software in ["slipfox calckey", "calckey", "groundpolis", "foundkey", "cherrypick", "meisskey", "magnetar", "keybump", "dolphin", "calckey social", "azk.sns", "firefish", "qtmmsky", "iceshrimp", "owohub", "re+", "russkey", "loverskey", "hajkey", "sharkey"] or "shumihub" in software or "мисскей" in software or "milkey" in software or "misskey" in software: + elif software in ["slipfox calckey", "calckey", "groundpolis", "foundkey", "cherrypick", "meisskey", "magnetar", "keybump", "dolphin", "calckey social", "azk.sns", "firefish", "qtmmsky", "iceshrimp", "owohub", "re+", "russkey", "loverskey", "hajkey", "sharkey", "renekey", "renekey-lite", "yoiyami", "catnip"] or "shumihub" in software or "мисскей" in software or "milkey" in software or "misskey" in software: logger.debug("Setting misskey: software='%s'", software) software = "misskey" elif software in ["runtube.re", "islameye"]: -- 2.39.5