From 3b7e8ffd45989dd63ffa8e9ff4ec5b6d18464f3a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Wed, 24 May 2023 15:11:47 +0200 Subject: [PATCH] Continued: - fixed debug message (ops) - commented out noisy debug lines --- fba.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/fba.py b/fba.py index c035291..9427b14 100644 --- 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: -- 2.39.5