Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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
|
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'''
|