# -*- coding: utf-8 -*-
# @Author: wangkun
# @Time: 2023/6/19
import os
import sys
sys.path.append(os.getcwd())
from common.common import Common
from xiaoniangao.xiaoniangao_author.xiaoniangao_author_scheduling import XiaoniangaoAuthorScheduling


def xiaoniangao_author_main(log_type, crawler, env):
    Common.logger(log_type, crawler).info(f'开始抓取:小年糕账号\n')
    Common.logging(log_type, crawler, env, "开始抓取:小年糕账号\n")
    XiaoniangaoAuthorScheduling.get_author_videos(log_type=log_type,
                                                  crawler=crawler,
                                                  user_list=[{"uid": 6267140, "source": "xiaoniangao", "link": "108137355", "nick_name": "小年糕账号测试账号", "avatar_url": "http://rescdn.yishihui.com/user/default/avatar/live/1616555588736_u=2429663738,2803743392&fm=26&gp=0.jpg", "mode": "author"}],
                                                  rule_dict={"play_cnt":{"min":500,"max":0},"period":{"min":3,"max":3},"duration":{"min":40,"max":0}},
                                                  env=env)
    Common.logger(log_type, crawler).info("抓取一轮结束\n")
    Common.logging(log_type, crawler, env, "抓取一轮结束\n")


if __name__ == "__main__":
    xiaoniangao_author_main("author", "xiaoniangao", "dev")