Quellcode durchsuchen

fix news html for paid news

David vor 10 Jahren
Ursprung
Commit
87beada0b7
1 geänderte Dateien mit 6 neuen und 5 gelöschten Zeilen
  1. 6 5
      news.py

+ 6 - 5
news.py

@@ -37,7 +37,7 @@ class News():
                 a = Article(url, language=lang,keep_article_html=True,request_timeout=10)
                 a.download()
             else:
-                a= Article("")
+                a= Article("",keep_article_html=True)
                 a.set_html(html)
 
             a.parse()
@@ -59,10 +59,11 @@ class News():
         self.SUMMARY=a.summary
         self.TEXT=a.text
         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
         lowertext=self.TEXT.lower()
         for k in kw: