instances.set_detection_mode(domain, "PLATFORM")
elif not domain_helper.is_in_url(domain, response.url):
logger.warning("domain='%s' doesn't match response.url='%s', maybe redirect to other domain?", domain, response.url)
+
+ components = urlparse(response.url)
+
+ log.debug("components[]='%s'", type(components))
+ if not instances.is_registered(components.netloc):
+ logger.info("components.netloc='%s' is not registered, adding ...", components.netloc)
+ fetch_instances(components.netloc, domain, None, "fetch_generator")
+
message = f"Redirect from domain='{domain}' to response.url='{response.url}'"
instances.set_last_error(domain, message)
instances.set_software(domain, None)
instances.set_detection_mode(domain, None)
instances.set_nodeinfo_url(domain, None)
+
raise requests.exceptions.TooManyRedirects(message)
logger.debug("software[]='%s'", type(software))