Omkar008 commited on
Commit
cc0af57
1 Parent(s): f41c231

Update test.py

Browse files
Files changed (1) hide show
  1. test.py +1 -1
test.py CHANGED
@@ -184,7 +184,7 @@ def extract_text_and_links(html_content):
184
 
185
  # Extract text
186
  text = soup.get_text()
187
-
188
  # Extract links
189
  links = []
190
  for link in soup.find_all('a', href=True):
 
184
 
185
  # Extract text
186
  text = soup.get_text()
187
+ text = re.sub(r'\s+', ' ', text).strip()
188
  # Extract links
189
  links = []
190
  for link in soup.find_all('a', href=True):