# -*- coding: utf-8 -*-
# @Author: wang
# @Time: 2023/9/6
import os
import sys

sys.path.append(os.getcwd())
from common.common import Common
from zhufuquanzi.zhufuquanzi_recommend.zhufuquanzi_recommend2 import ZFQZRecommend


class ZFQZRecommendMain:
    @classmethod
    def zhufuquanzi_recommend_main(cls, log_type, crawler, env):
        for i in range(1):
            Common.logger(log_type, crawler).info('开始抓取"祝福圈子"推荐')
            Common.logging(log_type, crawler, env, '开始抓取"祝福圈子"推荐')
            rule_dict = {"period": {"min": 365, "max": 365},
                         "duration": {"min": 40, "max": 2400},
                         "play_cnt": {"min": 100000, "max": 0},
                         "like_cnt": {"min": 1000, "max": 0},
                         # "play_cnt": {"min": 1, "max": 0},
                         # "like_cnt": {"min": 0, "max": 0},
                         "videos_cnt": {"min": 10, "max": 0}}
            ZFQZRecommend.start_wechat(log_type=log_type,
                                       crawler=crawler,
                                       rule_dict=rule_dict,
                                       our_uid=6267141,
                                       env=env)
            Common.logger(log_type, crawler).info("抓取一轮结束\n")
            Common.logging(log_type, crawler, env, "抓取一轮结束\n")


if __name__ == "__main__":
    ZFQZRecommendMain.zhufuquanzi_recommend_main("recommend", "zhufuquanzi", "dev")
