zhangyong 1 سال پیش
والد
کامیت
adc3e418bc
2فایلهای تغییر یافته به همراه8 افزوده شده و 6 حذف شده
  1. 3 3
      main.py
  2. 5 3
      video_stitching/video_stitching.py

+ 3 - 3
main.py

@@ -21,17 +21,17 @@ def job_video_stitching():
     koubo_count = sql.get_koubo_account_id()
     koubo_count = sql.get_koubo_account_id()
     ks_yinmei_count = sql.get_ks_yinmei_account_id()
     ks_yinmei_count = sql.get_ks_yinmei_account_id()
     if int(ks_yinmei_count) < 10:
     if int(ks_yinmei_count) < 10:
-        Common.logger().info("开始执行")
+        Common.logger("video").info("开始执行-快手")
         video_type = "音画美文"
         video_type = "音画美文"
         channel_type = "kuaishou"
         channel_type = "kuaishou"
         VideoStitching.video_stitching(video_type, ks_yinmei_count, channel_type)
         VideoStitching.video_stitching(video_type, ks_yinmei_count, channel_type)
     elif int(dy_yinmei_count) < 10:
     elif int(dy_yinmei_count) < 10:
-        Common.logger().info("开始执行")
+        Common.logger("video").info("开始执行-抖音")
         video_type = "音画美文"
         video_type = "音画美文"
         channel_type = "douyin"
         channel_type = "douyin"
         VideoStitching.video_stitching(video_type, dy_yinmei_count, channel_type)
         VideoStitching.video_stitching(video_type, dy_yinmei_count, channel_type)
     elif int(koubo_count) < 10:
     elif int(koubo_count) < 10:
-        Common.logger().info("开始执行")
+        Common.logger("video").info("开始执行-口播")
         video_type = "口播--美文类"
         video_type = "口播--美文类"
         channel_type = "koubo"
         channel_type = "koubo"
         VideoStitching.video_stitching(video_type, koubo_count, channel_type)
         VideoStitching.video_stitching(video_type, koubo_count, channel_type)

+ 5 - 3
video_stitching/video_stitching.py

@@ -291,7 +291,8 @@ class VideoStitching():
 
 
 
 
     @classmethod
     @classmethod
-    def get_audio_url(cls, i, cookie):
+    def get_audio_url(cls, i):
+        cookie = Material.get_houtai_cookie()
         url = f"https://admin.piaoquantv.com/manager/video/detail/{i}"
         url = f"https://admin.piaoquantv.com/manager/video/detail/{i}"
 
 
         payload = {}
         payload = {}
@@ -330,13 +331,14 @@ class VideoStitching():
 
 
     @classmethod
     @classmethod
     def video_stitching(cls, video_type, count, channel_type):
     def video_stitching(cls, video_type, count, channel_type):
-        cookie = Material.get_houtai_cookie()
+        Common.logger("video").info(f"获取音频类型+字幕")
         # 获取音频类型+字幕
         # 获取音频类型+字幕
         audio_id, srt, title_list = Material.get_audio_type(video_type, count, channel_type)
         audio_id, srt, title_list = Material.get_audio_type(video_type, count, channel_type)
         # 获取音频url
         # 获取音频url
         if audio_id == None:
         if audio_id == None:
+            Common.logger("video").info(f"获取音频url为空")
             return
             return
-        audio = cls.get_audio_url(audio_id, cookie)
+        audio = cls.get_audio_url(audio_id)
         if audio == "":
         if audio == "":
             Common.logger("video").info(f"获取音频地址为空")
             Common.logger("video").info(f"获取音频地址为空")
             return
             return