Fix (?) for yet more duplicate uppercase entries

This commit is contained in:
Mint 2022-08-07 14:17:12 +03:00
parent b3fa2f5b4a
commit 5727c24375
2 changed files with 3 additions and 2 deletions

View file

@ -44,7 +44,7 @@ def get_mastodon_blocks(domain: str) -> dict:
if header_text in blocks: if header_text in blocks:
blocks[header_text].append( blocks[header_text].append(
{ {
"domain": line.find("span").text.lower(), "domain": line.find("span").text,
"hash": line.find("span")["title"][9:], "hash": line.find("span")["title"][9:],
"reason": line.find_all("td")[1].text.strip(), "reason": line.find_all("td")[1].text.strip(),
} }
@ -145,6 +145,7 @@ for blocker, software in c.fetchall():
json = get_mastodon_blocks(blocker) json = get_mastodon_blocks(blocker)
for block_level, blocks in json.items(): for block_level, blocks in json.items():
for instance in blocks: for instance in blocks:
blocked == blocked.lower()
blocked, blocked_hash, reason = instance.values() blocked, blocked_hash, reason = instance.values()
if blocked.count("*") <= 1: if blocked.count("*") <= 1:
c.execute( c.execute(