Skip to content

Commit

Permalink
查询车票URL变更
Browse files Browse the repository at this point in the history
  • Loading branch information
huzhifeng committed Dec 14, 2014
1 parent 43605fc commit 11edf75
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion py12306.py
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,13 @@ def updateHeaders(self, url):
'Cache-Control': 'no-cache',
'If-Modified-Since': '0'
},
'https://kyfw.12306.cn/otn/leftTicket/queryT?': {
'method': 'GET',
'Referer': 'https://kyfw.12306.cn/otn/leftTicket/init',
'x-requested-with': 'XMLHttpRequest',
'Cache-Control': 'no-cache',
'If-Modified-Since': '0'
},
'https://kyfw.12306.cn/otn/login/checkUser': {
'method': 'POST',
'Referer': 'https://kyfw.12306.cn/otn/leftTicket/init',
Expand Down Expand Up @@ -406,6 +413,7 @@ def updateHeaders(self, url):
'https://kyfw.12306.cn/otn/passcodeNew/getPassCodeNew?module=passenger&rand=randp&',
'https://kyfw.12306.cn/otn/leftTicket/log?',
'https://kyfw.12306.cn/otn/leftTicket/query?',
'https://kyfw.12306.cn/otn/leftTicket/queryT?',
'https://kyfw.12306.cn/otn/confirmPassenger/queryOrderWaitTime?',
'https://kyfw.12306.cn/otn//payOrder/init?'
]
Expand Down Expand Up @@ -848,7 +856,7 @@ def queryTickets(self):
if not r:
print(u'查询车票异常')

url = 'https://kyfw.12306.cn/otn/leftTicket/query?'
url = 'https://kyfw.12306.cn/otn/leftTicket/queryT?'
parameters = [
('leftTicketDTO.train_date', self.train_date),
('leftTicketDTO.from_station', self.from_station_telecode),
Expand Down

0 comments on commit 11edf75

Please sign in to comment.