From 817efacd30a5c539e8ff9b2241c08d411ecd18af Mon Sep 17 00:00:00 2001 From: sb Date: Fri, 24 May 2024 12:13:06 -0400 Subject: [PATCH] w3c ingress fix --- bigbang/ingress/w3c.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bigbang/ingress/w3c.py b/bigbang/ingress/w3c.py index 07b9f4b..3c3a658 100644 --- a/bigbang/ingress/w3c.py +++ b/bigbang/ingress/w3c.py @@ -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: