logger.debug("Checking %d header(s) ...", len(headers))
for header in headers:
logger.debug("header[]='%s'", type(header))
- content = header.find(["h2", "h3", "h4", "h5"]).contents[0]
+ content = header.find(["h2", "h3", "h4", "h5"])
+
+ logger.debug("content[%s]='%s' - BEFORE!", type(content), content)
+ if content is not None:
+ content = content.contents[0]
+ logger.debug("content[%s]='%s' - AFTER!", type(content), content)
- logger.debug("content[%s]='%s'", type(content), content)
if content is None:
logger.debug("domain='%s' has returned empty header='%s' - SKIPPED!", domain, header)
continue