From f9d221393d508c052c56cbc8abf04aa411776454 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Tue, 24 Oct 2023 20:45:11 +0200 Subject: [PATCH] Continued: - some Friendica instances may have no table tag --- fba/networks/friendica.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fba/networks/friendica.py b/fba/networks/friendica.py index 1372093..1434697 100644 --- a/fba/networks/friendica.py +++ b/fba/networks/friendica.py @@ -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") -- 2.39.5