if isinstance(sub, tuple):
_cache[key][sub[0]] = value
else:
- print(f"WARNING: Unsupported type row[]='{type(row)}'")
+ print(f"WARNING: Unsupported type sub[]='{type(sub)}'")
# DEBUG: print("DEBUG: EXIT!")
domains.append(domain)
except BaseException as exception:
- print(f"ERROR: Cannot fetch feed='{feed}',exception[{type(exception)}]:'{str(exception)}'")
+ print(f"ERROR: Cannot fetch args.feed='{args.feed}',exception[{type(exception)}]:'{str(exception)}'")
sys.exit(255)
# DEBUG: print(f"DEBUG: domains()={len(domains)}")
software = "misskey"
elif software.find("/") > 0:
print("WARNING: Spliting of slash:", software)
- software = tidup_domain(software.split("/")[-1]);
+ software = tidyup_domain(software.split("/")[-1]);
elif software.find("|") > 0:
print("WARNING: Spliting of pipe:", software)
software = tidyup_domain(software.split("|")[0]);
# DEBUG: print(f"DEBUG: Returning data({len(data)})=[]:{type(data)}")
return data
-def send_bot_post(instance: str, blocklist: dict):
- # DEBUG: print(f"DEBUG: instance={instance},blocklist()={len(blocklist)} - CALLED!")
+def send_bot_post(domain: str, blocklist: dict):
+ # DEBUG: print(f"DEBUG: domain={domain},blocklist()={len(blocklist)} - CALLED!")
if not isinstance(domain, str):
raise ValueError(f"Parameter domain[]='{type(domain)}' is not 'str'")
elif domain == "":
elif not isinstance(blocklist, dict):
raise ValueError(f"Parameter blocklist[]='{type(blocklist)}' is not 'dict'")
- message = f"{instance} has blocked the following instances:\n\n"
+ message = f"{domain} has blocked the following instances:\n\n"
truncated = False
if len(blocklist) > 20:
for line in rows:
# DEBUG: print(f"DEBUG: line='{line}'")
blocked.append({
- "domain": tidyup_domain(line.find_all("td")[0].text),
- "reason": tidyup_reason(line.find_all("td")[1].text)
+ "domain": fba.tidyup_domain(line.find_all("td")[0].text),
+ "reason": fba.tidyup_reason(line.find_all("td")[1].text)
})
# DEBUG: print("DEBUG: Next!")