Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
janlyn06
12306
提交
009b989a
1
12306
项目概览
janlyn06
/
12306
通知
4
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
1
12306
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
009b989a
编写于
6月 11, 2018
作者:
W
wenxianping
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
1、修改小黑屋逻辑
上级
b88d541f
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
7 addition
and
10 deletion
+7
-10
.idea/inspectionProfiles/profiles_settings.xml
.idea/inspectionProfiles/profiles_settings.xml
+0
-0
init/SelectTicketInfoFast.py
init/SelectTicketInfoFast.py
+5
-6
inter/Query.py
inter/Query.py
+2
-4
未找到文件。
.idea/inspectionProfiles/profiles_settings.xml
100644 → 100755
浏览文件 @
009b989a
文件模式从 100644 更改为 100755
init/SelectTicketInfoFast.py
浏览文件 @
009b989a
...
...
@@ -14,6 +14,7 @@ import collections
from
agency.cdn_utils
import
CDNProxy
from
config
import
urlConf
from
config.TicketEnmu
import
ticket
from
config.emailConf
import
sendEmail
from
config.ticketConf
import
_get_yaml
from
init
import
login
...
...
@@ -53,7 +54,6 @@ class selectFast:
self
.
cdn_list
=
[]
self
.
is_check_user
=
dict
()
self
.
ticket_black_list
=
dict
()
self
.
black_train_no
=
""
self
.
passengerTicketStrList
=
""
self
.
oldPassengerStr
=
""
...
...
@@ -176,10 +176,8 @@ class selectFast:
to_station_h
=
self
.
to_station
,
_station_seat
=
self
.
_station_seat
,
station_trains
=
self
.
station_trains
,
station_dates
=
self
.
station_dates
,
black_train_no
=
self
.
black_train_no
)
station_dates
=
self
.
station_dates
,)
queryResult
=
q
.
sendQuery
()
self
.
black_train_no
=
""
# 重置小黑屋名单
# 查询接口
if
queryResult
.
get
(
"status"
,
False
):
secretStr
=
queryResult
.
get
(
"secretStr"
,
""
)
...
...
@@ -193,7 +191,7 @@ class selectFast:
if
self
.
ticket_black_list
.
has_key
(
train_no
)
and
(
datetime
.
datetime
.
now
()
-
self
.
ticket_black_list
[
train_no
]).
seconds
/
60
<
int
(
self
.
ticket_black_list_time
):
print
(
u
"该车次{} 正在被关小黑屋,跳过此车次"
.
format
(
train_no
))
print
(
ticket
.
QUEUE_WARNING_MSG
.
format
(
train_no
))
else
:
# 获取联系人
if
not
self
.
passengerTicketStrList
and
not
self
.
oldPassengerStr
:
...
...
@@ -229,7 +227,8 @@ class selectFast:
getQueueCountAsyncResult
=
g
.
sendGetQueueCountAsync
()
time
.
sleep
(
submitResult
.
get
(
"ifShowPassCodeTime"
,
1
))
if
getQueueCountAsyncResult
.
get
(
"is_black"
,
False
):
self
.
black_train_no
=
getQueueCountAsyncResult
.
get
(
"train_no"
,
""
)
black_train_no
=
getQueueCountAsyncResult
.
get
(
"train_no"
,
""
)
self
.
ticket_black_list
[
black_train_no
]
=
datetime
.
datetime
.
now
()
if
getQueueCountAsyncResult
.
get
(
"status"
,
False
):
# 请求订单快读接口
c
=
confirmSingleForQueueAsys
(
session
=
self
,
...
...
inter/Query.py
浏览文件 @
009b989a
...
...
@@ -13,7 +13,7 @@ class query:
"""
def
__init__
(
self
,
session
,
from_station
,
to_station
,
from_station_h
,
to_station_h
,
_station_seat
,
station_trains
,
black_train_no
,
station_dates
=
None
,
):
station_dates
=
None
,
):
self
.
session
=
session
self
.
from_station
=
from_station
self
.
to_station
=
to_station
...
...
@@ -23,7 +23,6 @@ class query:
self
.
_station_seat
=
_station_seat
if
isinstance
(
_station_seat
,
list
)
else
list
(
_station_seat
)
self
.
station_dates
=
station_dates
if
isinstance
(
station_dates
,
list
)
else
list
(
station_dates
)
self
.
ticket_black_list
=
dict
()
self
.
black_train_no
=
black_train_no
def
station_seat
(
self
,
index
):
"""
...
...
@@ -46,8 +45,7 @@ class query:
查询
:return:
"""
if
self
.
black_train_no
:
self
.
ticket_black_list
[
self
.
black_train_no
]
=
datetime
.
datetime
.
now
()
for
station_date
in
self
.
station_dates
:
select_url
=
copy
.
copy
(
self
.
session
.
urls
[
"select_url"
])
select_url
[
"req_url"
]
=
select_url
[
"req_url"
].
format
(
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录