bcci commited on
Commit
056c0e1
·
verified ·
1 Parent(s): 48f0eb9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -31,8 +31,9 @@ async def scraper(url):
31
 
32
  async def text_scraper(url):
33
  """Fetches HTML content using AsyncFetcher and than extract text."""
34
- html = await async_fetcher.get(url) # Use await for async operations
35
- text = html.get_all_text()
 
36
  text = re.sub(r'\n+', ' ', text)
37
  text = re.sub(r'\s+', ' ', text)
38
  return text
 
31
 
32
  async def text_scraper(url):
33
  """Fetches HTML content using AsyncFetcher and than extract text."""
34
+ html = await async_fetcher.get(url).get_all_text() # Use await for async operations
35
+ print(html)
36
+ text = html
37
  text = re.sub(r'\n+', ' ', text)
38
  text = re.sub(r'\s+', ' ', text)
39
  return text