locking.acquire()
components = urlparse(args.feed)
+ domain = components.netloc.lower().split(":")[0]
- if sources.is_recent(components.netloc):
- logger.info("API from components.netloc='%s' has recently being accessed - EXIT!", components.netloc)
+ logger.debug("domain='%s'", domain)
+ if sources.is_recent(domain):
+ logger.info("API from domain='%s' has recently being accessed - EXIT!", domain)
return 0
else:
- logger.debug("components.netloc='%s' has not been recently used, marking ...", components.netloc)
- sources.update(components.netloc)
+ logger.debug("domain='%s' has not been recently used, marking ...", domain)
+ sources.update(domain)
logger.info("Fetch FBA-specific RSS args.feed='%s' ...", args.feed)
response = utils.fetch_url(args.feed, network.web_headers, (config.get("connection_timeout"), config.get("read_timeout")))
continue
components = urlparse(link["href"])
- domain = components.netloc.lower()
+ domain = components.netloc.lower().split(":")[0]
logger.debug("domain='%s' - BEFORE!", domain)
domain = tidyup.domain(domain) if domain != None and domain != "" else None
logger.warning("domain='%s' doesn't match response.url='%s', maybe redirect to other domain?", domain, response.url)
components = urlparse(response.url)
+ domain2 = components.netloc.lower().split(":")[0]
- logger.debug("components[]='%s'", type(components))
- if not instances.is_registered(components.netloc):
+ logger.debug("domain2='%s'", domain2)
+ if not instances.is_registered(domain2):
logger.info("components.netloc='%s' is not registered, adding ...", components.netloc)
- fetch_instances(components.netloc, domain, None, "fetch_generator")
+ fetch_instances(domain2, domain, None, "fetch_generator")
message = f"Redirect from domain='{domain}' to response.url='{response.url}'"
instances.set_last_error(domain, message)
url = f"{components.scheme}://{domain}{components.path}"
components = urlparse(url)
- logger.debug("components.netloc[]='%s'", type(components.netloc))
- if not domain_helper.is_wanted(components.netloc):
- logger.debug("components.netloc='%s' is not wanted - SKIPPED!", components.netloc)
+ domain2 = components.netloc.lower().split(":")[0]
+ logger.debug("domain2='%s'", domain2)
+ if not domain_helper.is_wanted(domain2):
+ logger.debug("domain2='%s' is not wanted - SKIPPED!", domain2)
continue
logger.debug("Fetching nodeinfo from url='%s' ...", url)