查询时禁止 redirect, 修改 typo #113

This commit is contained in:
Jalin
2019-01-24 22:22:49 +08:00
parent 4398e60305
commit 547300b609
2 changed files with 4 additions and 3 deletions

View File

@@ -18,6 +18,7 @@
- [x] 邮件通知
- [x] Web 管理页面
- [x] 微信消息通知
- [ ] 代理池支持
## 使用
py12306 需要运行在 python 3.6 以上版本(其它版本暂未测试)
@@ -83,7 +84,7 @@ python main.py
将配置文件的中 `CLUSTER_ENABLED` 打开即开启分布式
目前提供了一个单独的子节点配置文件 `env.slave.py.example` 将文件修改为 `env.slave.py` 通过 `python main -c env.slave.py` 即可快速启动
目前提供了一个单独的子节点配置文件 `env.slave.py.example` 将文件修改为 `env.slave.py` 通过 `python main.py -c env.slave.py` 即可快速启动
## Docker 使用

View File

@@ -131,9 +131,9 @@ class Job:
arrive_station=self.arrive_station_code, type='leftTicket/queryZ')
if Config.is_cdn_enabled() and Cdn().is_ready:
self.is_cdn = True
return self.query.session.cdn_request(url, timeout=self.query_time_out)
return self.query.session.cdn_request(url, timeout=self.query_time_out, allow_redirects=False)
self.is_cdn = False
return self.query.session.get(url, timeout=self.query_time_out)
return self.query.session.get(url, timeout=self.query_time_out, allow_redirects=False)
def handle_response(self, response):
"""