if isinstance(tag, bs4.element.Tag):
# 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"
+ # NOISY-DEBUG: pprint(f"DEBUG: software='{software}', setting detection mode ...")
+ nodeinfos["detection_mode"][domain] = "GENERATOR"
remove_pending_error(domain)
except BaseException as e:
# NOISY-DEBUG: print(f"DEBUG: software[]={type(software)}")
if type(software) is str and software == "":
+ print(f"DEBUG: Corrected empty string to None for software of domain='{domain}'")
software = None
elif type(software) is str and "." in software:
# NOISY-DEBUG: print(f"DEBUG: software='{software}' may contain a version number, domain='{domain}', removing it ...")
software = determine_software(domain)
# NOISY-DEBUG: print("DEBUG: Determined software:", software)
- print(f"INFO: Adding new instance {domain} (origin: {origin})")
+ print(f"INFO: Adding instance {domain} (origin: {origin})")
try:
cursor.execute(
"INSERT INTO instances (domain, origin, originator, hash, software, first_seen) VALUES (?, ?, ?, ?, ?, ?)",
),
)
- if domain in nodeinfos["nodeinfo_url"]:
- # NOISY-DEBUG # NOISY-DEBUG: print("DEBUG: domain has pending nodeinfo being updated:", domain)
- update_nodeinfos(domain)
- remove_pending_error(domain)
- elif domain in pending_errors:
+ for key in nodeinfos:
+ # NOISY-DEBUG: pprint(f"DEBUG: key='{key}',domain='{domain}',nodeinfos[key]={nodeinfos[key]}")
+ if domain in nodeinfos[key]:
+ # NOISY-DEBUG: pprint(f"DEBUG: domain='{domain}' has pending nodeinfo being updated ...")
+ update_nodeinfos(domain)
+ remove_pending_error(domain)
+ break
+
+ if domain in pending_errors:
# NOISY-DEBUG: print("DEBUG: domain has pending error being updated:", domain)
update_last_error(domain, pending_errors[domain])
remove_pending_error(domain)