Commit 547300b6 authored by Jalin's avatar Jalin

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

parent 4398e603
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
- [x] 邮件通知 - [x] 邮件通知
- [x] Web 管理页面 - [x] Web 管理页面
- [x] 微信消息通知 - [x] 微信消息通知
- [ ] 代理池支持
## 使用 ## 使用
py12306 需要运行在 python 3.6 以上版本(其它版本暂未测试) py12306 需要运行在 python 3.6 以上版本(其它版本暂未测试)
...@@ -83,7 +84,7 @@ python main.py ...@@ -83,7 +84,7 @@ python main.py
将配置文件的中 `CLUSTER_ENABLED` 打开即开启分布式 将配置文件的中 `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 使用 ## Docker 使用
......
...@@ -131,9 +131,9 @@ class Job: ...@@ -131,9 +131,9 @@ class Job:
arrive_station=self.arrive_station_code, type='leftTicket/queryZ') arrive_station=self.arrive_station_code, type='leftTicket/queryZ')
if Config.is_cdn_enabled() and Cdn().is_ready: if Config.is_cdn_enabled() and Cdn().is_ready:
self.is_cdn = True 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 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): def handle_response(self, response):
""" """
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment