run.py 394 B

1234567891011121314
  1. from proxypool.scheduler import Scheduler
  2. import argparse
  3. parser = argparse.ArgumentParser(description='ProxyPool')
  4. parser.add_argument('--processor', type=str, help='processor to run')
  5. args = parser.parse_args()
  6. if __name__ == '__main__':
  7. # if processor set, just run it
  8. if args.processor:
  9. getattr(Scheduler(), f'run_{args.processor}')()
  10. else:
  11. Scheduler().run()