可扩展的Cookies池,用无头浏览器登录并生成cookie供给爬虫使用
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
875 B

8 years ago
# Redis数据库地址
7 years ago
REDIS_HOST = 'localhost'
8 years ago
8 years ago
# Redis端口
8 years ago
REDIS_PORT = 6379
8 years ago
# Redis密码,如无填None
7 years ago
REDIS_PASSWORD = 'foobared'
8 years ago
7 years ago
# 产生器使用的浏览器
BROWSER_TYPE = 'Chrome'
8 years ago
8 years ago
# 产生器类,如扩展其他站点,请在此配置
8 years ago
GENERATOR_MAP = {
8 years ago
'weibo': 'WeiboCookiesGenerator'
8 years ago
}
8 years ago
# 测试类,如扩展其他站点,请在此配置
8 years ago
TESTER_MAP = {
8 years ago
'weibo': 'WeiboValidTester'
8 years ago
}
7 years ago
TEST_URL_MAP = {
'weibo': 'https://m.weibo.cn/api/container/getIndex?uid=1804544030&type=uid&page=1&containerid=1076031804544030'
}
8 years ago
# 产生器和验证器循环周期
CYCLE = 120
# API地址和端口
API_HOST = '127.0.0.1'
API_PORT = 5000
7 years ago
# 产生器开关,模拟登录添加Cookies
GENERATOR_PROCESS = False
# 验证器开关,循环检测数据库中Cookies是否可用,不可用删除
8 years ago
VALID_PROCESS = False
8 years ago
# API接口服务
8 years ago
API_PROCESS = True