Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
py12306
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
python
py12306
Commits
547300b6
Commit
547300b6
authored
Jan 24, 2019
by
Jalin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
查询时禁止 redirect, 修改 typo #113
parent
4398e603
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
README.md
README.md
+2
-1
job.py
py12306/query/job.py
+2
-2
No files found.
README.md
View file @
547300b6
...
...
@@ -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 使用
...
...
py12306/query/job.py
View file @
547300b6
...
...
@@ -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
):
"""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment