]> git.mxchange.org Git - fba.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Fri, 19 May 2023 19:35:04 +0000 (21:35 +0200)
committerRoland Häder <roland@mxchange.org>
Fri, 19 May 2023 19:35:04 +0000 (21:35 +0200)
- need to check if current "step"'s entries are lesser than expected to
  break out loop

fba.py

diff --git a/fba.py b/fba.py
index f19c1083d9949e1888f4974096f1882c73515862..9eefe74dac19bdfc63701f07c115124188e98e7b 100644 (file)
--- 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: