Skip to content

Commit

Permalink
w3c ingress fix
Browse files Browse the repository at this point in the history
  • Loading branch information
sbenthall committed May 24, 2024
1 parent 8a8cc09 commit 817efac
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion bigbang/ingress/w3c.py
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,12 @@ def text_for_selector(soup: BeautifulSoup, selector: str):
"""
Filter out header or body field from website and return them as utf-8 string.
"""
results = soup.select(selector)
if soup is not None:
results = soup.select(selector)
else:
results = None
logger.debug("No soup provided to select on.")

if results:
result = results[0].get_text(strip=True)
else:
Expand Down

0 comments on commit 817efac

Please sign in to comment.