# -*- coding: utf-8 -*-
# @Author: wangkun
# @Time: 2023/6/14
import os
import sys
sys.path.append(os.getcwd())
from common.common import Common
from douyin.douyin_recommend.douyin_recommend_scheduling import DouyinrecommendScheduling


def douyin_recommend_main(log_type, crawler, env):
    Common.logger(log_type, crawler).info(f'开始抓取 西瓜推荐\n')
    Common.logging(log_type, crawler, env, "开始抓取 西瓜推荐\n")
    DouyinrecommendScheduling.get_videoList(log_type=log_type,
                                            crawler=crawler,
                                            rule_dict={"like_cnt":{"min":50000,"max":0},"duration":{"min":60,"max":0},"period":{"min":60,"max":60},"share_cnt":{"min":2000,"max":0}},
                                            our_uid=6267140,
                                            env=env)
    Common.logger(log_type, crawler).info("抓取一轮结束\n")
    Common.logging(log_type, crawler, env, "抓取一轮结束\n")


if __name__ == "__main__":
    douyin_recommend_main("recommend", "douyin", "dev")