https://dynamic.12306.cn/otsweb/order/querySingleAction.do?method=queryLeftTicket&orderRequest.train_date=2012-01-19&orderRequest.from_station_telecode=SHH&orderRequest.to_station_telecode=ZZF&orderRequest.train_no=&trainPassType=QB&trainClass=QB%23D%23Z%23T%23K%23QT%23&includeStudent=00&seatTypeAndNum=&orderRequest.start_time_str=00%3A00--24%3A00
https://dynamic.12306.cn/otsweb/order/querySingleAction.do? method=queryLeftTicket &orderRequest.train_date=2012-01-18 &orderRequest.from_station_telecode=SHH &orderRequest.to_station_telecode=ZZF &orderRequest.train_no= &trainPassType=QB &trainClass=QB%23D%23Z%23T%23K%23QT%23 &includeStudent=00 &seatTypeAndNum= &orderRequest.start_time_str=00%3A00--24%3A00
"https://dynamic.12306.cn/otsweb/order/querySingleAction.do? method=queryLeftTicket &orderRequest.train_date=2012-01-19 &orderRequest.from_station_telecode=SHH &orderRequest.to_station_telecode=ZZF &orderRequest.train_no= &trainPassType=QB &trainClass=QB#D#Z#T#K#QT# &includeStudent=00 &seatTypeAndNum= &orderRequest.start_time_str=00:00--24:00"
此 URL 是 查詢 指定日期 的 火車票 余票 狀況.

預(yù)定 按鈕 執(zhí)行的 操作

提交 表單 函數(shù)

更具 以上 信息 構(gòu)造表單
 <form id="orderForm" method="post" action="/otsweb/order/querySingleAction.do?method=submutOrderRequest"> <input type="hidden" name="station_train_code" id="station_train_code"> <input type="hidden" name="train_date" id="train_date" value="2012-01-18"> <input type="hidden" name="seattype_num" id="seattype_num" value=""> <input type="hidden" name="from_station_telecode" id="from_station_telecode" value="SHH"> <input type="hidden" name="to_station_telecode" id="to_station_telecode" value="ZZF"> <input type="hidden" name="include_student" id="include_student" value="00"> <input type="hidden" name="from_station_telecode_name" id="from_station_telecode_name" value="上海"> <input type="hidden" name="to_station_telecode_name" id="to_station_telecode_name" value="鄭州"> <input type="hidden" name="round_train_date" id="round_train_date" value="2012-01-27"> <input type="hidden" name="round_start_time_str" id="round_start_time_str" value="00:00--24:00"> <input type="hidden" name="single_round_type" id="single_round_type" value="2"> <input type="hidden" name="train_pass_type" id="train_pass_type" value="QB"> <input type="hidden" name="train_class_arr" id="train_class_arr" value="QB#D#Z#T#K#QT#"> <input type="hidden" name="start_time_str" id="start_time_str" value="00:00--24:00"> <!-- 獲取具體車次的值 --> <input type="hidden" name="lishi" id="lishi"> <input type="hidden" name="train_start_time" id="train_start_time"> <input type="hidden" name="trainno" id="trainno"> <input type="hidden" name="arrive_time" id="arrive_time"> <input type="hidden" name="from_station_name" id="from_station_name"> <input type="hidden" name="to_station_name" id="to_station_name"> <input type="hidden" name="ypInfoDetail" id="ypInfoDetail"> <input type="Submit" name="submit" id = "submit"/> </form>

通過 修改 html 代碼 嵌入 頁面

做法 :
寫 一個(gè) 循環(huán)., 監(jiān)聽 https://dynamic.12306.cn/otsweb/order/querySingleAction.do?method=queryLeftTicket&orderRequest.train_date=2012-01-19&orderRequest.from_station_telecode=SHH&orderRequest.to_station_telecode=ZZF&orderRequest.train_no=&trainPassType=QB&trainClass=QB%23D%23Z%23T%23K%23QT%23&includeStudent=00&seatTypeAndNum=&orderRequest.start_time_str=00%3A00--24%3A00 發(fā)現(xiàn) 自己需要的 車 有票 則 提交表單.或發(fā)送短信. 此過程并無 驗(yàn)證碼,前提是 你在登陸的 狀態(tài). 會(huì)自動(dòng) 跳轉(zhuǎn)到 Order 頁面 下單, 剩下的 只有 靠 上帝保佑.
|