]> git.mxchange.org Git - fba.git/blobdiff - fetch_blocks.py
Continued:
[fba.git] / fetch_blocks.py
index 170e52ad7ab703ad55b183af6be33409b2860f28..2cc618025603a45d1582e91583ed697be6f520b7 100644 (file)
@@ -23,8 +23,12 @@ for blocker, software in fba.c.fetchall():
         print("INFO: blocker:", blocker)
         try:
             # Blocks
-            federation = reqto.get(f"https://{blocker}/nodeinfo/2.1.json", headers=fba.headers, timeout=5
-            ).json()["metadata"]["federation"]
+            json = fba.fetch_nodeinfo(blocker)
+            if json is None:
+                print("WARNING: Could not fetch nodeinfo from blocker:", blocker)
+                continue
+
+            federation = json["metadata"]["federation"]
 
             if "enabled" in federation:
                 # NOISY-DEBUG: print("DEBUG: Instance has no block list to analyze:", blocker)