run_dy_author_dev.py 1.3 KB

12345678910111213141516171819202122232425
  1. # -*- coding: utf-8 -*-
  2. # @Author: wangkun
  3. # @Time: 2023/6/14
  4. import os
  5. import sys
  6. sys.path.append(os.getcwd())
  7. from common.common import Common
  8. from douyin.douyin_author.douyin_author_scheduling import DouyinauthorScheduling
  9. def douyin_author_main(log_type, crawler, env):
  10. Common.logger(log_type, crawler).info("开始抓取:抖音账号\n")
  11. Common.logging(log_type, crawler, env, "开始抓取:抖音账号\n")
  12. DouyinauthorScheduling.get_author_videos(log_type=log_type,
  13. crawler=crawler,
  14. rule_dict={"like_cnt":{"min":30000,"max":0},"duration":{"min":50,"max":1800},"period":{"min":15,"max":15}},
  15. user_list=[{"uid": 6267140, "source": "douyin", "link": "MS4wLjABAAAApCwcn6-2-_to5Qld7jAT78-Ano5_9JzXbT5ylfNJntY", "nick_name": "大白爆笑社", "avatar_url": "http://rescdn.yishihui.com/user/default/avatar/live/1616555584754_u=3828798179,534417403&fm=26&gp=0.jpg", "mode": "author"}],
  16. env=env)
  17. Common.del_logs(log_type, crawler)
  18. Common.logger(log_type, crawler).info("抓取一轮结束\n")
  19. Common.logging(log_type, crawler, env, "抓取一轮结束\n")
  20. if __name__ == "__main__":
  21. douyin_author_main("author", "douyin", "dev")