)
searchres = fba.cursor.fetchone()
# DEBUG: print("DEBUG: searchres[]:", type(searchres))
- if searchres != None:
- blocked = searchres[0]
- nodeinfo_url = searchres[1]
- # DEBUG: print("DEBUG: Looked up domain:", blocked)
+
+ if searchres == None:
+ print(f"WARNING: Cannot deobsfucate blocked='{blocked}' - SKIPPED!")
+ continue
+
+ blocked = searchres[0]
+ nodeinfo_url = searchres[1]
+ # DEBUG: print("DEBUG: Looked up domain:", blocked)
elif not validators.domain(blocked):
print(f"WARNING: blocked='{blocked}',software='{software}' is not a valid domai name - skipped!")
continue
)
searchres = fba.cursor.fetchone()
- if searchres != None:
- blocked = searchres[0]
- origin = searchres[1]
- nodeinfo_url = searchres[2]
+ if searchres == None:
+ print(f"WARNING: Cannot deobsfucate blocked='{blocked}' - SKIPPED!")
+ continue
+
+ blocked = searchres[0]
+ origin = searchres[1]
+ nodeinfo_url = searchres[2]
elif not validators.domain(blocked):
print(f"WARNING: blocked='{blocked}',software='{software}' is not a valid domai name - skipped!")
continue
continue
# DEBUG: print(f"DEBUG: Checking {len(blocks)} entries from blocker='{blocker}',software='{software}',block_level='{block_level}' ...")
- for instance in blocks:
- blocked, blocked_hash, reason = instance.values()
+ for block in blocks:
+ blocked, blocked_hash, reason = block.values()
# DEBUG: print("DEBUG: blocked,hash,reason:", blocked, blocked_hash, reason)
blocked = fba.tidyup(blocked)
# DEBUG: print("DEBUG: AFTER-blocked:", blocked)
searchres = fba.cursor.fetchone()
if searchres == None:
- print(f"WARNING: Cannot deobsfucate blocked='{blocked}' - SKIPPED!")
+ print(f"WARNING: Cannot deobsfucate blocked='{blocked}',blocked_hash='{blocked_hash}' - SKIPPED!")
continue
# DEBUG: print("DEBUG: Updating domain: ", searchres[0])
elif software == "bookwyrm":
print("WARNING: bookwyrm is not fully supported for fetching blacklist!", blocker)
#json = fba.get_bookwyrm_blocks(blocker)
+ continue
elif software == "takahe":
print("WARNING: takahe is not fully supported for fetching blacklist!", blocker)
#json = fba.get_takahe_blocks(blocker)
+ continue
print(f"INFO: Checking {len(json.items())} entries from blocker='{blocker}',software='{software}' ...")
for block_level, blocks in json.items():
continue
# DEBUG: print(f"DEBUG: Checking {len(blocks)} entries from blocker='{blocker}',software='{software}',block_level='{block_level}' ...")
- for instance in blocks:
- blocked, reason = instance.values()
+ for block in blocks:
+ blocked, reason = block.values()
# DEBUG: print("DEBUG: BEFORE blocked:", blocked)
blocked = fba.tidyup(blocked)
# DEBUG: print("DEBUG: AFTER blocked:", blocked)