]> git.mxchange.org Git - fba.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Tue, 24 Oct 2023 18:45:11 +0000 (20:45 +0200)
committerRoland Häder <roland@mxchange.org>
Tue, 24 Oct 2023 18:45:11 +0000 (20:45 +0200)
- some Friendica instances may have no table tag

fba/networks/friendica.py

index 13720934f9f9cf30524d884aa6df6b6cf9d2ed45..1434697ae1ac06146eb4b78d79eb275e961c38ef 100644 (file)
@@ -70,7 +70,10 @@ def fetch_blocks(domain: str) -> list:
     table = block_tag.find("table")
 
     logger.debug("table[]='%s'", type(table))
-    if table.find("tbody"):
+    if table is None:
+        logger.warning("domain='%s' has no table tag - EXIT !", domain)
+        return list()
+    elif table.find("tbody"):
         rows = table.find("tbody").find_all("tr")
     else:
         rows = table.find_all("tr")