main_time.py 805 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. import time
  2. import os
  3. import time
  4. import os
  5. import sys
  6. # print(sys.argv[1])
  7. can = sys.argv[1]
  8. # tag = sys.argv[2]
  9. # print(type(can))
  10. if can == 'roll':
  11. while True:
  12. os.system("scrapy crawl roll_zuqiu")
  13. time.sleep(2)
  14. os.system("scrapy crawl ball_status")
  15. time.sleep(2)
  16. os.system("scrapy crawl ball_status_update")
  17. time.sleep(10)
  18. if can == 'notroll':
  19. while True:
  20. os.system("scrapy crawl zuqiu")
  21. time.sleep(2)
  22. os.system("scrapy crawl wqbodan")
  23. time.sleep(2)
  24. os.system("scrapy crawl wangqiu")
  25. time.sleep(2)
  26. os.system("scrapy crawl lanqiu")
  27. time.sleep(2)
  28. os.system("scrapy crawl guanjun")
  29. time.sleep(2)
  30. os.system("scrapy crawl bangqiu")
  31. time.sleep(60)