From cec45a7ad7a80b6711fed9b5c9725d2759a5c25c Mon Sep 17 00:00:00 2001 From: Leonardo Brondani Schenkel Date: Wed, 16 Jun 2021 05:57:22 +0200 Subject: [PATCH] Strip surrounding whitespace from elements (#89) --- backend/fetch_site_status.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/fetch_site_status.py b/backend/fetch_site_status.py index 8705201d..a1034769 100644 --- a/backend/fetch_site_status.py +++ b/backend/fetch_site_status.py @@ -73,7 +73,7 @@ class perform_site_check(): soup = BeautifulSoup(r.content, "html.parser") stripped_text_from_html = "" for item in soup.select(css_filter): - text = str(item.get_text())+"\n" + text = str(item.get_text()).strip() + '\n' stripped_text_from_html += text else: