]> git.mxchange.org Git - fba.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Wed, 24 May 2023 13:11:47 +0000 (15:11 +0200)
committerRoland Häder <roland@mxchange.org>
Wed, 24 May 2023 13:11:47 +0000 (15:11 +0200)
- fixed debug message (ops)
- commented out noisy debug lines

fba.py

diff --git a/fba.py b/fba.py
index c035291ee2bf28413cd3fef826f963e5e9046442..9427b147b3ed645c13f20ea88020a431f8ef62e1 100644 (file)
--- a/fba.py
+++ b/fba.py
@@ -239,14 +239,14 @@ def get_peers(domain: str, software: str) -> list:
 
         start = 0
         for mode in ["followers", "following"]:
-            print(f"DEBUG: domain='{domain}',mode='{mode}'")
+            # NOISY-DEBUG: print(f"DEBUG: domain='{domain}',mode='{mode}'")
             while True:
                 try:
                     res = reqto.get(f"https://{domain}/api/v1/server/{mode}?start={start}&count=100", headers=headers, timeout=(config["connection_timeout"], config["read_timeout"]))
 
                     # NOISY-DEBUG: print(f"DEBUG: res.ok={res.ok},res.json[]={type(res.json())}")
                     if res.ok and isinstance(res.json(), dict):
-                        # NOISY-DEBUG: uccess, res.json():", len(res.json()))
+                        # NOISY-DEBUG: print("DEBUG: Success, res.json():", len(res.json()))
                         json = res.json()
 
                         if "data" in json:
@@ -386,6 +386,7 @@ def fetch_wellknown_nodeinfo(domain: str) -> list:
                     if link["rel"] in nodeinfo_identifier:
                         # NOISY-DEBUG: print("DEBUG: Fetching nodeinfo from:", link["href"])
                         res = reqto.get(link["href"])
+
                         # NOISY-DEBUG: print("DEBUG: href,res.ok,res.status_code:", link["href"], res.ok, res.status_code)
                         if res.ok and isinstance(res.json(), dict):
                             # NOISY-DEBUG: print("DEBUG: Found JSON nodeinfo():", len(res.json()))
@@ -642,7 +643,7 @@ def get_mastodon_blocks(domain: str) -> dict:
         header_text = tidyup(header.text)
 
         if header_text in language_mapping:
-            print(f"DEBUG: header_text='{header_text}'")
+            # NOISY-DEBUG: print(f"DEBUG: header_text='{header_text}'")
             header_text = language_mapping[header_text]
 
         if header_text in blocks or header_text.lower() in blocks: