Normalize case
This commit is contained in:
parent
d0e7051a52
commit
d8fc0154b7
@ -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,
|
"domain": line.find("span").text.lower(),
|
||||||
"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(),
|
||||||
}
|
}
|
||||||
@ -104,6 +104,7 @@ for blocker, software in c.fetchall():
|
|||||||
for blocked in blocks:
|
for blocked in blocks:
|
||||||
if blocked == "":
|
if blocked == "":
|
||||||
continue
|
continue
|
||||||
|
blocked == blocked.lower()
|
||||||
c.execute(
|
c.execute(
|
||||||
"select domain from instances where domain = ?", (blocked,)
|
"select domain from instances where domain = ?", (blocked,)
|
||||||
)
|
)
|
||||||
|
@ -52,6 +52,7 @@ c.execute(
|
|||||||
)
|
)
|
||||||
|
|
||||||
for instance in peerlist:
|
for instance in peerlist:
|
||||||
|
instance = instance.lower()
|
||||||
print(instance)
|
print(instance)
|
||||||
try:
|
try:
|
||||||
if c.fetchone() == None:
|
if c.fetchone() == None:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user