zhangyong 1 jaar geleden
bovenliggende
commit
e4bc1db8c8
2 gewijzigde bestanden met toevoegingen van 9 en 6 verwijderingen
  1. 6 6
      main.py
  2. 3 0
      video_stitching/video_stitching.py

+ 6 - 6
main.py

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

+ 3 - 0
video_stitching/video_stitching.py

@@ -359,6 +359,9 @@ class VideoStitching():
             Common.logger().info(f"获取用户ID:{account}")
             # 获取 未使用的视频链接
             url_list = cls.get_url_list(audio_id, account)
+            if url_list == None:
+                Common.logger().info(f"未使用视频链接为空:{url_list}")
+                return
             videos = [list(item) for item in url_list]
         videos = Oss.get_oss_url(video_type, videos)
         # 视频截取