]> git.mxchange.org Git - fba.git/commitdiff
Fixed:
authorRoland Häder <roland@mxchange.org>
Tue, 13 Jun 2023 17:20:22 +0000 (19:20 +0200)
committerRoland Häder <roland@mxchange.org>
Tue, 13 Jun 2023 17:20:22 +0000 (19:20 +0200)
- also the other way around

fba/networks/mastodon.py

index 32655e75e7cab7ed1deb66cc4922bd645ed90b3c..bcbfe9dc4c797dad37bbc8e7ffccdd8f9a095a80 100644 (file)
@@ -87,11 +87,6 @@ def fetch_blocks_from_about(domain: str) -> dict:
             instances.update_last_error(domain, exception)
             break
 
-    # DEBUG: print(f"DEBUG: doc[]='{type(doc)}'")
-    if doc is None:
-        print(f"WARNING: Cannot fetch any /about pages for domain='{domain}' - EXIT!")
-        return blocklist
-
     blocklist = {
         "Suspended servers": [],
         "Filtered media"   : [],
@@ -99,6 +94,11 @@ def fetch_blocks_from_about(domain: str) -> dict:
         "Silenced servers" : [],
     }
 
+    # DEBUG: print(f"DEBUG: doc[]='{type(doc)}'")
+    if doc is None:
+        print(f"WARNING: Cannot fetch any /about pages for domain='{domain}' - EXIT!")
+        return blocklist
+
     for header in doc.find_all("h3"):
         header_text = tidyup.reason(header.text)