]> git.mxchange.org Git - fba.git/blobdiff - fba/commands.py
Continued:
[fba.git] / fba / commands.py
index 89e9ed4304aecfc063882e52e61dea43a54b07cd..7611f5560c13ee7e3fab0d1e597fd7525b2c37ab 100644 (file)
@@ -1151,16 +1151,16 @@ def fetch_txt(args: argparse.Namespace) -> int:
         logger.debug("response.ok='%s',response.status_code=%d,response.text()=%d", response.ok, response.status_code, len(response.text))
         if response.ok and response.status_code == 200 and response.text != "":
             logger.debug("Returned %d Bytes for processing", len(response.text.strip()))
-            domains = response.text.split("\n")
+            domains = response.text.strip().split("\n")
 
             logger.info("Processing %d domains ...", len(domains))
             for domain in domains:
                 logger.debug("domain='%s' - BEFORE!", domain)
-                domain = tidyup.domain(domain)
+                domain = tidyup.domain(domain) if domain != None and domain != "" else None
 
                 logger.debug("domain='%s' - AFTER!", domain)
-                if domain == "":
-                    logger.debug("domain is empty - SKIPPED!")
+                if domain is None or domain == "":
+                    logger.debug("domain='%s' is empty - SKIPPED!", domain)
                     continue
                 elif not domain_helper.is_wanted(domain):
                     logger.debug("domain='%s' is not wanted - SKIPPED!", domain)