# -*- coding: utf-8 -*-
# @Author: wangkun
# @Time: 2023/6/9
import os
import sys
sys.path.append(os.getcwd())
from common.common import Common
from kuaishou.kuaishou_recommend.kuaishou_recommend_cut_title import KuaiShouRecommendScheduling


def kuaishou_recommend_main(log_type, crawler, env):
    Common.logger(log_type, crawler).info("开始抓取快手推荐\n")
    Common.logging(log_type, crawler, env, "开始抓取快手推荐\n")
    KuaiShouRecommendScheduling.get_videoList(log_type=log_type,
                                              crawler=crawler,
                                              our_uid=6267140,
                                              rule_dict={"play_cnt":{"min":10000,"max":0},"like_cnt":{"min":8000,"max":0},"duration":{"min":50,"max":0},"period":{"min":30,"max":30}},
                                              env=env)
    Common.del_logs(log_type, crawler)
    Common.logger(log_type, crawler).info("抓取一轮结束\n")
    Common.logging(log_type, crawler, env, "抓取一轮结束\n")


if __name__ == "__main__":
    kuaishou_recommend_main("recommend", "kuaishou", "dev")