From: Roland Häder Date: Fri, 19 May 2023 19:35:04 +0000 (+0200) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=3094e8fe2ded722093eb73b5b2e0addfe5295bfc;p=fba.git Continued: - need to check if current "step"'s entries are lesser than expected to break out loop --- diff --git a/fba.py b/fba.py index f19c108..9eefe74 100644 --- a/fba.py +++ b/fba.py @@ -328,6 +328,10 @@ def get_misskey_blocks(domain: str) -> dict: } ) + if len(doc) < step: + # NOISY-DEBUG: print("DEBUG: End of request:", len(doc), step) + break + # NOISY-DEBUG: print("DEBUG: Raising counter by step:", step) counter = counter + step @@ -368,6 +372,12 @@ def get_misskey_blocks(domain: str) -> dict: "domain": instance["host"], "reason": "" }) + + if len(doc) < step: + # NOISY-DEBUG: print("DEBUG: End of request:", len(doc), step) + break + + # NOISY-DEBUG: print("DEBUG: Raising counter by step:", step) counter = counter + step except: