raise ValueError(f"software[]={type(software)} is not 'str'")
if software == "misskey":
- print(f"DEBUG: Invoking misskey.get_peers({domain}) ...")
+ # DEBUG: print(f"DEBUG: Invoking misskey.get_peers({domain}) ...")
return misskey.get_peers(domain)
elif software == "lemmy":
- print(f"DEBUG: Invoking lemmy.get_peers({domain}) ...")
+ # DEBUG: print(f"DEBUG: Invoking lemmy.get_peers({domain}) ...")
return lemmy.get_peers(domain)
elif software == "peertube":
- print(f"DEBUG: Invoking peertube.get_peers({domain}) ...")
+ # DEBUG: print(f"DEBUG: Invoking peertube.get_peers({domain}) ...")
return peertube.get_peers(domain)
# DEBUG: print(f"DEBUG: Fetching get_peers_url='{get_peers_url}' from '{domain}',software='{software}' ...")
return peers
def post_json_api(domain: str, path: str, parameter: str, extra_headers: dict = {}) -> dict:
+ # DEBUG: print(f"DEBUG: domain='{domain}',path='{path}',parameter='{parameter}',extra_headers()={len(extra_headers)} - CALLED!")
if type(domain) != str:
raise ValueError(f"Parameter domain[]={type(domain)} is not 'str'")
elif domain == "":
software = "misskey"
elif software.find("/") > 0:
print("WARNING: Spliting of slash:", software)
- software = software.split("/")[-1];
+ software = tidup_domain(software.split("/")[-1]);
elif software.find("|") > 0:
print("WARNING: Spliting of pipe:", software)
software = tidyup_domain(software.split("|")[0]);