spider_scheduler.py 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. import os
  2. import sys
  3. sys.path.append(os.getcwd())
  4. from spider.crawler_offline import *
  5. from spider.crawler_offline.shipinshuashua_id import SPSSIdRecommend
  6. class SpiderHome(object):
  7. @classmethod
  8. def run_xng_plus(cls):
  9. rule_dict1 = {
  10. "period": {"min": 365, "max": 365},
  11. "duration": {"min": 30, "max": 1800},
  12. "favorite_cnt": {"min": 0, "max": 0},
  13. "videos_cnt": {"min": 5000, "max": 0},
  14. "share_cnt": {"min": 0, "max": 0},
  15. }
  16. XiaoNianGaoPlusRecommend(
  17. "recommend",
  18. "xiaoniangaoplus",
  19. "prod",
  20. rule_dict1,
  21. [64120158, 64120157, 63676778],
  22. )
  23. @classmethod
  24. def run_spss(cls):
  25. rule_dict = {
  26. "videos_cnt": {"min": 600, "max": 600},
  27. "play_cnt": {"min": 5000, "max": 5000}
  28. }
  29. SPSSRecommend(
  30. log_type="recommend",
  31. crawler="shipinshuashua",
  32. env="prod",
  33. rule_dict=rule_dict,
  34. our_uid=[66433018, 66433020, 66433022, 66433023, 66433024]
  35. )
  36. @classmethod
  37. def run_spss_id(cls):
  38. SPSSIdRecommend(
  39. env="prod"
  40. )