logger.debug("Loading configuration file ...")
_config = json.loads(f.read())
_config["max_crawl_depth"] = min(_config["max_crawl_depth"], (sys.getrecursionlimit() - 50))
+ logger.debug("LOADED!")
def get(key: str) -> any:
logger.debug("key[%s]='%s' - CALLED!", type(key), key)
logger.debug("Setting last_error_details='%s' (error_message)", error['error_message'])
_set_data("last_status_code" , domain, error["status_code"])
_set_data("last_error_details", domain, error["error_message"] if error["error_message"] != "" else None)
+ elif "json" in error and "error" in error["json"] and "message" in error["json"]["error"]:
+ logger.debug("Setting last_error_details='%s' (json,error)", error["json"]["error"]["message"])
+ _set_data("last_status_code" , domain, error["status_code"])
+ _set_data("last_error_details", domain, error["json"]["error"]["message"] if error["json"]["error"]["message"] != "" else None)
elif "json" in error and "error" in error["json"]:
logger.debug("Setting last_error_details='%s' (json,error)", error["json"]["error"])
_set_data("last_status_code" , domain, error["status_code"])