logger.debug("fetched[]='%s'", type(fetched))
if "error_message" in fetched:
- logger.warning("post_json_api() for 'gql.sources.bka.li' returned error message='%s", fetched["error_message"])
+ logger.warning("post_json_api() for 'gql.sources.bka.li' returned error message='%s' - EXIT!", fetched["error_message"])
return 100
elif isinstance(fetched["json"], dict) and "error" in fetched["json"] and "message" in fetched["json"]["error"]:
- logger.warning("post_json_api() returned error: '%s", fetched["error"]["message"])
+ logger.warning("post_json_api() returned error: '%s' - EXIT!", fetched["error"]["message"])
return 101
rows = fetched["json"]
elif args.no_detection:
logger.info("Fetching domains with no detection mode being set ...")
database.cursor.execute("SELECT domain, software FROM instances WHERE detection_mode IS NULL ORDER BY last_updated ASC")
+ elif args.same:
+ logger.info("Fetching domains with domain name and software being the same ...")
+ database.cursor.execute("SELECT domain, software FROM instances WHERE domain=software ORDER BY last_updated ASC")
else:
logger.info("Fetching domains for recently updated ...")
database.cursor.execute("SELECT domain, software FROM instances ORDER BY last_updated ASC")