Strip surrounding whitespace from elements (#89)

pull/94/head
Leonardo Brondani Schenkel 4 years ago committed by GitHub
parent dc62bcdfca
commit cec45a7ad7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -73,7 +73,7 @@ class perform_site_check():
soup = BeautifulSoup(r.content, "html.parser") soup = BeautifulSoup(r.content, "html.parser")
stripped_text_from_html = "" stripped_text_from_html = ""
for item in soup.select(css_filter): 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 stripped_text_from_html += text
else: else:

Loading…
Cancel
Save