|
@@ -37,7 +37,7 @@ class News():
|
|
|
a = Article(url, language=lang,keep_article_html=True,request_timeout=10)
|
|
a = Article(url, language=lang,keep_article_html=True,request_timeout=10)
|
|
|
a.download()
|
|
a.download()
|
|
|
else:
|
|
else:
|
|
|
- a= Article("")
|
|
|
|
|
|
|
+ a= Article("",keep_article_html=True)
|
|
|
a.set_html(html)
|
|
a.set_html(html)
|
|
|
|
|
|
|
|
a.parse()
|
|
a.parse()
|
|
@@ -59,10 +59,11 @@ class News():
|
|
|
self.SUMMARY=a.summary
|
|
self.SUMMARY=a.summary
|
|
|
self.TEXT=a.text
|
|
self.TEXT=a.text
|
|
|
self.TITLE=a.title
|
|
self.TITLE=a.title
|
|
|
- if html is None:
|
|
|
|
|
- self.HTML=htmlmin.minify(a.article_html,remove_empty_space=True)
|
|
|
|
|
- else:
|
|
|
|
|
- self.HTML=htmlmin.minify(html,remove_empty_space=True)
|
|
|
|
|
|
|
+ self.HTML=htmlmin.minify(a.article_html,remove_empty_space=True)
|
|
|
|
|
+# if html is None:
|
|
|
|
|
+# self.HTML=htmlmin.minify(a.article_html,remove_empty_space=True)
|
|
|
|
|
+# else:
|
|
|
|
|
+# self.HTML=htmlmin.minify(html,remove_empty_space=True)
|
|
|
self.ERROR=False
|
|
self.ERROR=False
|
|
|
lowertext=self.TEXT.lower()
|
|
lowertext=self.TEXT.lower()
|
|
|
for k in kw:
|
|
for k in kw:
|