Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -11,13 +11,13 @@ warnings.filterwarnings("ignore")
|
|
11 |
|
12 |
g = Goose()
|
13 |
|
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'''
|
22 |
ua = UserAgent()
|
23 |
headers = {'User-Agent':str(ua.chrome)}
|
|
|
11 |
|
12 |
g = Goose()
|
13 |
|
|
|
|
|
|
|
|
|
|
|
|
|
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'''
|
22 |
ua = UserAgent()
|
23 |
headers = {'User-Agent':str(ua.chrome)}
|