修改排队时间很长的问题

pull/23/head
wenxianping 2018-01-14 20:30:59 +08:00
parent 44a41f9131
commit a3ba39c757
2 changed files with 5 additions and 3 deletions

View File

@ -224,7 +224,7 @@ class select:
break
else:
print ('正在尝试提交订票...')
self.submitOrderRequestFunc(from_station, to_station, self.time())
# self.submitOrderRequestFunc(from_station, to_station, self.time())
if self.check_user():
self.submit_station()
self.getPassengerTicketStr(self._station_seat[j].encode("utf8"))
@ -523,8 +523,10 @@ class select:
print("超出排队时间,自动放弃,正在重新刷票")
break
try:
queryOrderWaitTimeUrl = "https://kyfw.12306.cn/otn/confirmPassenger/queryOrderWaitTime?random={0}&tourFlag=dc&_json_att=&REPEAT_SUBMIT_TOKEN={1}".format(_random, self.get_token())
queryOrderWaitTimeResult = json.loads(myurllib2.get(queryOrderWaitTimeUrl))
# queryOrderWaitTimeUrl = "https://kyfw.12306.cn/otn/confirmPassenger/queryOrderWaitTime?random={0}&tourFlag=dc&_json_att=&REPEAT_SUBMIT_TOKEN={1}".format(_random, self.get_token())
data = {"random": random.random(), "tourFlag": "dc"}
queryOrderWaitTimeUrl = "https://kyfw.12306.cn/otn/confirmPassenger/queryOrderWaitTime"
queryOrderWaitTimeResult = json.loads(myurllib2.Post(queryOrderWaitTimeUrl, data))
except ValueError:
queryOrderWaitTimeResult = {}
if queryOrderWaitTimeResult:

BIN
tkcode

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 14 KiB