From: Roland Häder <roland@mxchange.org>
Date: Thu, 25 May 2023 20:52:56 +0000 (+0200)
Subject: Continued:
X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=52f4a319af9fd9ff35e39ed8c104c8ebbf469ca7;p=fba.git

Continued:
- added 'GENERATOR' as "detection mode"
- explained NULL in 'detection_mode'
---

diff --git a/fba.py b/fba.py
index 502b9b2..96e7f29 100644
--- a/fba.py
+++ b/fba.py
@@ -48,7 +48,8 @@ headers = {
 # written to database. Both arrays must be filled at the same time or else
 # update_nodeinfos() will fail
 nodeinfos = {
-    # Detection mode: AUTO_DISCOVERY or STATIC_CHECKS
+    # Detection mode: 'AUTO_DISCOVERY', 'STATIC_CHECKS' or 'GENERATOR'
+    # NULL means all detection methods have failed (maybe still reachable instance)
     "detection_mode": {},
     # Found nodeinfo URL
     "nodeinfo_url": {},
@@ -468,6 +469,7 @@ def fetch_generator_from_path(domain: str, path: str = "/") -> str:
                 # NOISY-DEBUG: print("DEBUG: Found generator meta tag: ", domain)
                 software = tidyup(tag.get("content"))
                 # NOISY-DEBUG: print(f"DEBUG: software='{software}'")
+                nodeinfos["detection_mode"] = "GENERATOR"
                 remove_pending_error(domain)
 
     except BaseException as e: