|
|
@@ -29,16 +29,17 @@ class News():
|
|
|
self.SOURCE=source
|
|
|
self.MATCHING_KW=[]
|
|
|
|
|
|
- a = Article(url, language=lang,keep_article_html=True)
|
|
|
+ a = Article(url, language=lang,keep_article_html=True,request_timeout=10)
|
|
|
try:
|
|
|
a.download()
|
|
|
a.parse()
|
|
|
- except Exception:
|
|
|
- print("ERROR parsing/downloading article")
|
|
|
+ a.nlp()
|
|
|
+ except Exception as e:
|
|
|
+ print("ERROR parsing/downloading/nlp article")
|
|
|
+ print(e)
|
|
|
self.ERROR=True
|
|
|
self.MATCHES=False
|
|
|
return
|
|
|
- a.nlp()
|
|
|
a.authors=self.dedup([self.fix_author(value) for value in a.authors if not self.isComment(value) and not self.isNoise(value)])
|
|
|
|
|
|
self.SCRAP_DATE=datetime.datetime.now()
|