浏览代码

渠道随机获取

zhangyong 10 月之前
父节点
当前提交
4a63ba7b54
共有 1 个文件被更改,包括 3 次插入5 次删除
  1. 3 5
      video_agc/agc_video.py

+ 3 - 5
video_agc/agc_video.py

@@ -418,11 +418,9 @@ class AGC():
                             Common.logger("video").info(f"{mark}的{platform}渠道新视频生成失败")
                             continue
                 else:
-                    chnnel_count = int(len(list_data)/2)
-                    if chnnel_count >= count:
-                        channel = "kuaishou"
-                    else:
-                        channel = "douyin"
+                    # chnnel_count = int(len(list_data)/2)
+                    channels = ["douyin", "kuaishou"]
+                    channel = random.choice(channels)
                     user_id = sqlHelp.get_user_id(channel, mark)
                     url_list, user = sqlHelp.get_url_list(user_id, mark, "35")
                     videos = [list(item) for item in url_list]