yassTrad commited on
Commit
dd5ac98
1 Parent(s): 4d1fa7c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
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)}