From: Roland Häder Date: Sat, 3 Feb 2024 19:39:39 +0000 (+0100) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=d56e4ed1d0090419c824e17f6220fc83d4e89fb8;p=fba.git Continued: - maybe there is no unsorted list or table at all --- diff --git a/fba/networks/lemmy.py b/fba/networks/lemmy.py index 766e4dd..b65b28f 100644 --- a/fba/networks/lemmy.py +++ b/fba/networks/lemmy.py @@ -272,8 +272,14 @@ def fetch_instances(domain: str, origin: str) -> list: logger.debug("Checking %d containers ...", len(containers)) for header in containers: logger.debug("header[%s]='%s'", type(header), header) + table = header.find_next(["ul","table"]) - rows = header.find_next(["ul","table"]).findAll("a") + logger.debug("table[]='%s'", type(table)) + if table is None: + logger.warning("No unsorted list or table found,domain='%s' - EXIT!", domain) + return peers + + rows = table.findAll("a") logger.debug("Found %d instance(s) ...", len(rows)) for tag in rows: logger.debug("tag[]='%s'", type(tag))