Преглед на файлове

新增公众新号-调试

zhangyong преди 1 година
родител
ревизия
54530ede9d
променени са 1 файла, в които са добавени 2 реда и са изтрити 3 реда
  1. 2 3
      gongzhongxinhao/gongzhongxinhao/gongzhongxinhao_author.py

+ 2 - 3
gongzhongxinhao/gongzhongxinhao/gongzhongxinhao_author.py

@@ -220,8 +220,7 @@ class GZXHAuthor:
         date_time_obj = datetime.strptime(publish_time_str, date_format)
         publish_time_stamp = int(date_time_obj.timestamp())
         article_url = article.get("url", "")
-        id = article.get("id", "")
-        video_id = wechat_gh + id
+        video_id = wechat_gh + str(int(date_time_obj.timestamp()))
         cover_url = article.get("head_pic", "")
         video_url = self.get_video_url(article_url)
         video_dict = {
@@ -272,7 +271,7 @@ class GZXHAuthor:
         else:
             values = [[
                 user_name,
-                article.get("aid", ""),
+                video_id,
                 article.get("title", "")
                     .replace(" ", "")
                     .replace('"', "")