From 547300b60995ecc9c5ac19be8a902df0aa3271dc Mon Sep 17 00:00:00 2001 From: Jalin Date: Thu, 24 Jan 2019 22:22:49 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E6=97=B6=E7=A6=81=E6=AD=A2?= =?UTF-8?q?=20redirect,=20=E4=BF=AE=E6=94=B9=20typo=20#113?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 3 ++- py12306/query/job.py | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 22a6278..003942c 100644 --- a/README.md +++ b/README.md @@ -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 使用 diff --git a/py12306/query/job.py b/py12306/query/job.py index 6d32032..68b6da9 100644 --- a/py12306/query/job.py +++ b/py12306/query/job.py @@ -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): """