def fetch_nodeinfo(domain: str) -> list:
# NOISY-DEBUG: print("DEBUG: Fetching nodeinfo from domain:", domain)
+ nodeinfo = fetch_wellknown_nodeinfo(domain)
+ # NOISY-DEBUG: print("DEBUG: nodeinfo:", len(nodeinfo))
+
+ if len(nodeinfo) > 0:
+ # NOISY-DEBUG: print("DEBUG: Returning auto-discovered nodeinfo:", len(nodeinfo))
+ return nodeinfo
+
requests = [
f"https://{domain}/nodeinfo/2.1.json",
f"https://{domain}/nodeinfo/2.1",
# NOISY-DEBUG: print("DEBUG: json[]:", type(json))
if json is None or len(json) == 0:
print("WARNING: Failed fetching nodeinfo from domain:", domain)
- json = fetch_wellknown_nodeinfo(domain)
# NOISY-DEBUG: print("DEBUG: Returning json[]:", type(json))
return json