From: Roland Häder Date: Tue, 28 Nov 2023 00:40:23 +0000 (+0100) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=d06cabbc57019af13e12940fb54d0b9583269ba4;p=fba.git Continued: - also skip empty 'href' values - include 'infos' array, too --- diff --git a/fba/http/nodeinfo.py b/fba/http/nodeinfo.py index b31e2ac..a0418dc 100644 --- a/fba/http/nodeinfo.py +++ b/fba/http/nodeinfo.py @@ -199,8 +199,8 @@ def fetch_wellknown_nodeinfo(domain: str) -> dict: elif "href" not in link: logger.warning("link[rel]='%s' has no element 'href' - SKIPPED!", link["rel"]) continue - elif link["href"] is None: - logger.debug("link[href] is None, link[rel]='%s' - SKIPPED!", link["rel"]) + elif link["href"] is None or link["href"] == "": + logger.debug("link[href]='%s',link[rel]='%s' - SKIPPED!", link["href"], link["rel"]) continue # Default is that 'href' has a complete URL, but some hosts don't send that @@ -255,7 +255,7 @@ def fetch_wellknown_nodeinfo(domain: str) -> dict: logger.debug("Marking domain='%s' as successfully handled ...", domain) instances.set_success(domain) else: - logger.warning("nodeinfo does not contain 'links' or 'server': domain='%s'", domain) + logger.warning("nodeinfo does not contain 'links' or 'server': domain='%s',infos[%s]='%s'", domain, type(infos), infos) logger.debug("Returning data[]='%s' - EXIT!", type(data)) return data