mirror of https://github.com/testerSunshine/12306
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
312 lines
9.5 KiB
312 lines
9.5 KiB
import random
|
|
|
|
import time
|
|
|
|
urls = {
|
|
"auth": {
|
|
"req_url": "/passport/web/auth/uamtk",
|
|
"req_type": "post",
|
|
"Referer": "https://kyfw.12306.cn/otn/passport?redirect=/otn/login/userLogin",
|
|
"Host": "kyfw.12306.cn",
|
|
"re_try": 10,
|
|
"re_time": 0.1,
|
|
"s_time": 0.1,
|
|
"is_logger": True,
|
|
"is_json": True,
|
|
},
|
|
"login": {
|
|
"req_url": "/passport/web/login",
|
|
"req_type": "post",
|
|
"Referer": "https://kyfw.12306.cn/otn/login/init",
|
|
"Host": "kyfw.12306.cn",
|
|
"re_try": 10,
|
|
"re_time": 0.1,
|
|
"s_time": 0.1,
|
|
"is_logger": True,
|
|
"is_json": True,
|
|
|
|
},
|
|
"getCodeImg": {
|
|
"req_url": "/passport/captcha/captcha-image?login_site=E&module=login&rand=sjrand&{0}",
|
|
"req_type": "get",
|
|
"Referer": "https://kyfw.12306.cn/otn/login/init",
|
|
"Host": "kyfw.12306.cn",
|
|
"re_try": 10,
|
|
"re_time": 0.1,
|
|
"s_time": 0.1,
|
|
"is_logger": False,
|
|
"is_json": False,
|
|
},
|
|
"codeCheck": {
|
|
"req_url": "/passport/captcha/captcha-check",
|
|
"req_type": "post",
|
|
"Referer": "https://kyfw.12306.cn/otn/login/init",
|
|
"Host": "kyfw.12306.cn",
|
|
"re_try": 10,
|
|
"re_time": 0.1,
|
|
"s_time": 0.1,
|
|
"is_logger": True,
|
|
"is_json": True,
|
|
},
|
|
"loginInit": {
|
|
"req_url": "/otn/login/init",
|
|
"req_type": "get",
|
|
"Referer": "https://kyfw.12306.cn/otn/index/init",
|
|
"Host": "kyfw.12306.cn",
|
|
"re_try": 10,
|
|
"re_time": 0.1,
|
|
"s_time": 0.1,
|
|
"is_logger": False,
|
|
"is_json": False,
|
|
},
|
|
"getUserInfo": {
|
|
"req_url": "/otn/index/initMy12306",
|
|
"req_type": "get",
|
|
"Referer": "https://kyfw.12306.cn/otn/passport?redirect=/otn/login/userLogin",
|
|
"Host": "kyfw.12306.cn",
|
|
"re_try": 10,
|
|
"re_time": 0.1,
|
|
"s_time": 0.01,
|
|
"is_logger": False,
|
|
"is_json": False,
|
|
},
|
|
"userLogin": {
|
|
"req_url": "/otn/login/userLogin",
|
|
"req_type": "get",
|
|
"Referer": "https://kyfw.12306.cn/otn/passport?redirect=/otn/login/userLogin",
|
|
"Host": "kyfw.12306.cn",
|
|
"re_try": 10,
|
|
"re_time": 0.1,
|
|
"s_time": 0.1,
|
|
"is_logger": True,
|
|
"is_json": True,
|
|
},
|
|
"uamauthclient": {
|
|
"req_url": "/otn/uamauthclient",
|
|
"req_type": "post",
|
|
"Referer": "https://kyfw.12306.cn/otn/passport?redirect=/otn/login/userLogin",
|
|
"Host": "kyfw.12306.cn",
|
|
"re_try": 10,
|
|
"re_time": 0.1,
|
|
"s_time": 0.1,
|
|
"is_logger": True,
|
|
"is_json": True,
|
|
},
|
|
"initdc_url": {
|
|
"req_url": "/otn/confirmPassenger/initDc",
|
|
"req_type": "get",
|
|
"Referer": "https://kyfw.12306.cn/otn/leftTicket/init",
|
|
"Host": "kyfw.12306.cn",
|
|
"re_try": 10,
|
|
"re_time": 0.1,
|
|
"s_time": 1,
|
|
"is_logger": False,
|
|
"is_json": False,
|
|
},
|
|
"GetJS": {
|
|
"req_url": "/otn/HttpZF/GetJS",
|
|
"req_type": "get",
|
|
"Referer": "https://kyfw.12306.cn/otn/confirmPassenger/initDc",
|
|
"Host": "kyfw.12306.cn",
|
|
"re_try": 10,
|
|
"re_time": 0.1,
|
|
"s_time": 0.1,
|
|
"is_logger": False,
|
|
"is_json": False,
|
|
},
|
|
"odxmfwg": {
|
|
"req_url": "/otn/dynamicJs/odxmfwg",
|
|
"req_type": "get",
|
|
"Referer": "https://kyfw.12306.cn/otn/confirmPassenger/initDc",
|
|
"Host": "kyfw.12306.cn",
|
|
"re_try": 10,
|
|
"re_time": 0.1,
|
|
"s_time": 0.1,
|
|
"is_logger": False,
|
|
"is_json": False,
|
|
},
|
|
"get_passengerDTOs": {
|
|
"req_url": "/otn/confirmPassenger/getPassengerDTOs",
|
|
"req_type": "post",
|
|
"Referer": "https://kyfw.12306.cn/otn/confirmPassenger/initDc",
|
|
"Host": "kyfw.12306.cn",
|
|
"re_try": 10,
|
|
"re_time": 0.1,
|
|
"s_time": 0.1,
|
|
"is_logger": True,
|
|
"is_json": True,
|
|
},
|
|
"select_url": {
|
|
"req_url": "/otn/leftTicket/query?leftTicketDTO.train_date={0}&leftTicketDTO.from_station={1}&leftTicketDTO.to_station={2}&purpose_codes=ADULT",
|
|
"req_type": "post",
|
|
"Referer": "https://kyfw.12306.cn/otn/leftTicket/init",
|
|
"Host": "kyfw.12306.cn",
|
|
"re_try": 10,
|
|
"re_time": 0.1,
|
|
"s_time": 0.1,
|
|
"is_logger": False,
|
|
"is_json": True,
|
|
},
|
|
"check_user_url": {
|
|
"req_url": "/otn/login/checkUser",
|
|
"req_type": "post",
|
|
"Referer": "https://kyfw.12306.cn/otn/leftTicket/init",
|
|
"Host": "kyfw.12306.cn",
|
|
"re_try": 10,
|
|
"re_time": 0.3,
|
|
"s_time": 0.1,
|
|
"is_logger": True,
|
|
"is_json": True,
|
|
},
|
|
"submit_station_url": {
|
|
"req_url": "/otn/leftTicket/submitOrderRequest",
|
|
"req_type": "post",
|
|
"Referer": "https://kyfw.12306.cn/otn/leftTicket/init",
|
|
"Host": "kyfw.12306.cn",
|
|
"re_try": 10,
|
|
"re_time": 0.1,
|
|
"s_time": 0.1,
|
|
"is_logger": True,
|
|
"is_json": True,
|
|
},
|
|
"checkOrderInfoUrl": {
|
|
"req_url": "/otn/confirmPassenger/checkOrderInfo",
|
|
"req_type": "post",
|
|
"Referer": "https://kyfw.12306.cn/otn/confirmPassenger/initDc",
|
|
"Host": "kyfw.12306.cn",
|
|
"re_try": 10,
|
|
"re_time": 0.1,
|
|
"s_time": 0.1,
|
|
"is_logger": True,
|
|
"is_json": True,
|
|
},
|
|
"getQueueCountUrl": {
|
|
"req_url": "/otn/confirmPassenger/getQueueCount",
|
|
"req_type": "post",
|
|
"Referer": "https://kyfw.12306.cn/otn/confirmPassenger/initDc",
|
|
"Host": "kyfw.12306.cn",
|
|
"re_try": 10,
|
|
"re_time": 0.1,
|
|
"s_time": 0.1,
|
|
"is_logger": True,
|
|
"is_json": True,
|
|
},
|
|
"checkQueueOrderUrl": {
|
|
"req_url": "/otn/confirmPassenger/confirmSingleForQueue",
|
|
"req_type": "post",
|
|
"Referer": "https://kyfw.12306.cn/otn/confirmPassenger/initDc",
|
|
"Host": "kyfw.12306.cn",
|
|
"re_try": 10,
|
|
"re_time": 0.1,
|
|
"s_time": 0.1,
|
|
"is_logger": True,
|
|
"is_json": True,
|
|
},
|
|
"checkRandCodeAnsyn": {
|
|
"req_url": "/otn/passcodeNew/checkRandCodeAnsyn",
|
|
"req_type": "post",
|
|
"Referer": "https://kyfw.12306.cn/otn/confirmPassenger/initDc",
|
|
"Host": "kyfw.12306.cn",
|
|
"re_try": 10,
|
|
"re_time": 0.1,
|
|
"s_time": 0.1,
|
|
"is_logger": True,
|
|
"is_json": True,
|
|
},
|
|
"codeImgByOrder": {
|
|
"req_url": "/otn/passcodeNew/getPassCodeNew?module=passenger&rand=randp&%s" % random.random(),
|
|
"req_type": "post",
|
|
"Referer": "https://kyfw.12306.cn/otn/confirmPassenger/initDc",
|
|
"Host": "kyfw.12306.cn",
|
|
"re_try": 10,
|
|
"re_time": 0.1,
|
|
"s_time": 0.1,
|
|
"is_logger": False,
|
|
"is_json": False,
|
|
},
|
|
"queryOrderWaitTimeUrl": {
|
|
"req_url": "/otn/confirmPassenger/queryOrderWaitTime",
|
|
"req_type": "post",
|
|
"Referer": "https://kyfw.12306.cn/otn/confirmPassenger/initDc",
|
|
"Host": "kyfw.12306.cn",
|
|
"re_try": 10,
|
|
"re_time": 0.1,
|
|
"s_time": 0.1,
|
|
"is_logger": True,
|
|
"is_json": True,
|
|
},
|
|
"queryMyOrderNoCompleteUrl": {
|
|
"req_url": "/otn/queryOrder/queryMyOrderNoComplete",
|
|
"req_type": "post",
|
|
"Referer": "https://kyfw.12306.cn/otn/queryOrder/initNoComplete",
|
|
"Host": "kyfw.12306.cn",
|
|
"re_try": 10,
|
|
"re_time": 0.1,
|
|
"s_time": 0.1,
|
|
"is_logger": True,
|
|
"is_json": True,
|
|
},
|
|
"initNoCompleteUrl": {
|
|
"req_url": "/otn/queryOrder/initNoComplete",
|
|
"req_type": "post",
|
|
"Referer": "https://kyfw.12306.cn/otn/queryOrder/initNoComplete",
|
|
"Host": "kyfw.12306.cn",
|
|
"re_try": 10,
|
|
"re_time": 0.1,
|
|
"s_time": 0.1,
|
|
"is_logger": True,
|
|
"is_json": True,
|
|
},
|
|
"cancelNoCompleteMyOrder": {
|
|
"req_url": "/otn/queryOrder/cancelNoCompleteMyOrder",
|
|
"req_type": "post",
|
|
"Referer": "https://kyfw.12306.cn/otn/queryOrder/initNoComplete",
|
|
"Host": "kyfw.12306.cn",
|
|
"re_try": 10,
|
|
"re_time": 0.1,
|
|
"s_time": 0.1,
|
|
"is_logger": True,
|
|
"is_json": True,
|
|
},
|
|
"autoSubmitOrderRequest": {
|
|
"req_url": "/otn/confirmPassenger/autoSubmitOrderRequest",
|
|
"req_type": "post",
|
|
"Referer": "https://kyfw.12306.cn/otn/queryOrder/initNoComplete",
|
|
"Host": "kyfw.12306.cn",
|
|
"re_try": 10,
|
|
"re_time": 0.1,
|
|
"s_time": 0.1,
|
|
"is_logger": True,
|
|
"is_json": True,
|
|
},
|
|
"getQueueCountAsync": {
|
|
"req_url": "/otn/confirmPassenger/getQueueCountAsync",
|
|
"req_type": "post",
|
|
"Referer": "https://kyfw.12306.cn/otn/queryOrder/initNoComplete",
|
|
"Host": "kyfw.12306.cn",
|
|
"re_try": 10,
|
|
"re_time": 0.1,
|
|
"s_time": 0.1,
|
|
"is_logger": True,
|
|
"is_json": True,
|
|
},
|
|
"confirmSingleForQueueAsys": {
|
|
"req_url": "/otn/confirmPassenger/confirmSingleForQueueAsys",
|
|
"req_type": "post",
|
|
"Referer": "https://kyfw.12306.cn/otn/queryOrder/initNoComplete",
|
|
"Host": "kyfw.12306.cn",
|
|
"re_try": 10,
|
|
"re_time": 0.1,
|
|
"s_time": 0.1,
|
|
"is_logger": True,
|
|
"is_json": True,
|
|
},
|
|
"cdn_host": {
|
|
"req_url": "http://ping.chinaz.com/kyfw.12306.cn",
|
|
"req_type": "post"
|
|
},
|
|
"cdn_list": {
|
|
"req_url": "http://ping.chinaz.com/iframe.ashx?t=ping&callback=jQuery111304824429956769827_{}".format(int(round(time.time() * 1000))),
|
|
"req_type": "post"
|
|
}
|
|
} |