]> git.mxchange.org Git - fba.git/blobdiff - fba/utils.py
Continued:
[fba.git] / fba / utils.py
index 7829723f0724a17d6a0bdd5c0acd3ba042c8802a..7b87b1316eefe63acdd8599fd345991e9494478e 100644 (file)
@@ -66,6 +66,7 @@ def fetch_url(url: str, headers: dict, timeout: tuple) -> requests.models.Respon
     # Invoke other function, avoid trailing ?
     logger.debug("components[%s]='%s'", type(components), components)
     if components.query != "":
+        logger.debug("Fetching path='%s?%s' from netloc='%s' ...", components.path, components.query, components.netloc)
         response = network.fetch_response(
             components.netloc.split(":")[0],
             f"{components.path}?{components.query}",
@@ -73,6 +74,7 @@ def fetch_url(url: str, headers: dict, timeout: tuple) -> requests.models.Respon
             timeout
         )
     else:
+        logger.debug("Fetching path='%s' from netloc='%s' ...", components.path, components.netloc)
         response = network.fetch_response(
             components.netloc.split(":")[0],
             components.path if isinstance(components.path, str) and components.path != '' else '/',
@@ -105,6 +107,7 @@ def find_domains(tags: bs4.element.ResultSet, search: str) -> list:
             domain = tidyup.domain(tag.find("em").contents[0])
             logger.debug("domain='%s' - AFTER!", domain)
 
+        logger.debug("domain='%s' - AFTER2!", domain)
         if domain == "":
             logger.warning("Empty domain after checking search='%s' and <em> tags - SKIPPED!", search)
             continue
@@ -135,6 +138,7 @@ def deobfuscate(domain: str, blocker: str, domain_hash: str = None) -> str:
     logger.debug("Setting has_obfuscation=False for blocker='%s' ...", blocker)
     instances.set_has_obfuscation(blocker, False)
 
+    logger.debug("Checking domain='%s' ...", domain)
     if domain.find("*") >= 0:
         logger.debug("blocker='%s' uses obfuscated domains", blocker)
         instances.set_has_obfuscation(blocker, True)