Browse Source

update config

pull/4/merge
Germey 8 years ago
parent
commit
1d6813934a
  1. 6
      cookiespool/config.py
  2. 3
      cookiespool/scheduler.py

6
cookiespool/config.py

@ -23,16 +23,16 @@ YUNDAMA_API_URL = 'http://api.yundama.com/api.php'
YUNDAMA_MAX_RETRY = 20
# 产生器默认使用的浏览器
DEFAULT_BROWSER = 'PhantomJS'
DEFAULT_BROWSER = 'Chrome'
# 产生器类,如扩展其他站点,请在此配置
GENERATOR_MAP = {
'mweibo': 'MWeiboCookiesGenerator'
'weibo': 'WeiboCookiesGenerator'
}
# 测试类,如扩展其他站点,请在此配置
TESTER_MAP = {
'mweibo': 'MWeiboValidTester'
'weibo': 'WeiboValidTester'
}
# 产生器和验证器循环周期

3
cookiespool/scheduler.py

@ -44,15 +44,12 @@ class Scheduler(object):
if GENERATOR_PROCESS:
generate_process = Process(target=Scheduler.generate_cookie)
generate_process.start()
generate_process.join()
if VALID_PROCESS:
valid_process = Process(target=Scheduler.valid_cookie)
valid_process.start()
valid_process.join()
if API_PROCESS:
api_process = Process(target=Scheduler.api)
api_process.start()
api_process.join()

Loading…
Cancel
Save