mirror of
https://git.kiwifarms.net/mint/fedi-block-api.git
synced 2024-10-22 23:19:07 +00:00
Normalize case
This commit is contained in:
parent
d0e7051a52
commit
d8fc0154b7
2 changed files with 3 additions and 1 deletions
|
@ -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,)
|
||||
)
|
||||
|
|
|
@ -52,6 +52,7 @@ c.execute(
|
|||
)
|
||||
|
||||
for instance in peerlist:
|
||||
instance = instance.lower()
|
||||
print(instance)
|
||||
try:
|
||||
if c.fetchone() == None:
|
||||
|
|
Loading…
Reference in a new issue