From: Mint <> Date: Sat, 6 Aug 2022 15:31:31 +0000 (+0300) Subject: Normalize case X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=d8fc0154b73c75fc57c733cde920a4bcd086640f;p=fba.git Normalize case --- diff --git a/fetch_blocks.py b/fetch_blocks.py index c84ec57..104a79e 100644 --- a/fetch_blocks.py +++ b/fetch_blocks.py @@ -44,7 +44,7 @@ def get_mastodon_blocks(domain: str) -> dict: if header_text in blocks: blocks[header_text].append( { - "domain": line.find("span").text, + "domain": line.find("span").text.lower(), "hash": line.find("span")["title"][9:], "reason": line.find_all("td")[1].text.strip(), } @@ -104,6 +104,7 @@ for blocker, software in c.fetchall(): for blocked in blocks: if blocked == "": continue + blocked == blocked.lower() c.execute( "select domain from instances where domain = ?", (blocked,) ) diff --git a/fetch_instances.py b/fetch_instances.py index e1ab48a..c59d7fa 100644 --- a/fetch_instances.py +++ b/fetch_instances.py @@ -52,6 +52,7 @@ c.execute( ) for instance in peerlist: + instance = instance.lower() print(instance) try: if c.fetchone() == None: