yassTrad commited on
Commit
e029660
1 Parent(s): dd5ac98

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -14,8 +14,8 @@ g = Goose()
14
  def article_text_extractor(url: str):
15
  '''Extract text from url'''
16
  paper = g.extract(url=url)
17
-
18
- return paper.cleaned_text
19
 
20
  def article_text_extractor_(url: str):
21
  '''Extract text from url'''
 
14
  def article_text_extractor(url: str):
15
  '''Extract text from url'''
16
  paper = g.extract(url=url)
17
+ text = paper.cleaned_text if "reuters" not in url else " ".join(list(filter(None, body.split("\n")))[:-1])
18
+ return text
19
 
20
  def article_text_extractor_(url: str):
21
  '''Extract text from url'''