]> git.mxchange.org Git - fba.git/blobdiff - fba/networks/friendica.py
Continued:
[fba.git] / fba / networks / friendica.py
index f723c710f01a0368c21e93ec672b5408ada5eea3..05efa9a575b55fe570098bf6b5ac296a8a955062 100644 (file)
@@ -44,7 +44,7 @@ def fetch_blocks(domain: str) -> list:
     block_tag = None
 
     try:
-        logger.debug("Fetching friendica blocks from domain='%s'", domain)
+        logger.debug("Fetching friendica blocks from domain='%s' ...", domain)
         raw = network.fetch_response(
             domain,
             "/friendica",
@@ -85,10 +85,11 @@ def fetch_blocks(domain: str) -> list:
     for line in rows:
         logger.debug("line='%s'", line)
         blocked = line.find_all("td")[0].text
-        logger.debug("blocked='%s'", blocked)
+        reason  = line.find_all("td")[1].text
+        logger.debug("blocked='%s',reason='%s' - BEFORE!", blocked, reason)
 
         blocked = tidyup.domain(blocked) if blocked != "" else None
-        reason  = tidyup.reason(line.find_all("td")[1].text)
+        reason  = tidyup.reason(reason) if reason != "" else None
         logger.debug("blocked='%s',reason='%s' - AFTER!", blocked, reason)
 
         if blocked in [None, ""]: