David 10 سال پیش
والد
کامیت
447ebd3655
1فایلهای تغییر یافته به همراه4 افزوده شده و 1 حذف شده
  1. 4 1
      news.py

+ 4 - 1
news.py

@@ -59,7 +59,10 @@ class News():
         self.SUMMARY=a.summary
         self.TEXT=a.text
         self.TITLE=a.title
-        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: