mirror of https://github.com/testerSunshine/12306
fix
parent
632a971606
commit
01d54be85a
|
@ -2,3 +2,4 @@
|
|||
*.pyc
|
||||
*.yaml
|
||||
*.log
|
||||
idea/
|
||||
|
|
|
@ -43,10 +43,19 @@ set:
|
|||
station_dates:
|
||||
# - "2018-01-27"
|
||||
# - "2018-01-28"
|
||||
- "2018-02-10"
|
||||
- "2018-02-09"
|
||||
- "2018-02-10"
|
||||
# - "2018-02-09"
|
||||
station_trains:
|
||||
- "G4741"
|
||||
- "G2365"
|
||||
- "G1371"
|
||||
- "G1337"
|
||||
- "G1377"
|
||||
- "G1329"
|
||||
# - "G1302"
|
||||
# - "G1372"
|
||||
# - "G1326"
|
||||
# - "K4300"
|
||||
# - "K5226"
|
||||
# - "K7772"
|
||||
|
|
|
@ -186,7 +186,7 @@ class select:
|
|||
def submitOrderRequestFunc(self, from_station, to_station, station_date=None):
|
||||
select_url = self.confUrl["select_url"]["req_url"].format(
|
||||
station_date, from_station, to_station)
|
||||
station_ticket = self.httpClint.send(select_url)
|
||||
station_ticket = self.httpClint.send(select_url, is_logger=False)
|
||||
return json.loads(station_ticket)
|
||||
|
||||
def submitOrderRequestImplement(self, from_station, to_station,):
|
||||
|
@ -538,7 +538,7 @@ class select:
|
|||
elif "messages" in queryOrderWaitTimeResult and queryOrderWaitTimeResult["messages"]:
|
||||
print("排队等待失败: " + queryOrderWaitTimeResult["messages"])
|
||||
else:
|
||||
print("第{}次排队中,请耐心等待".format(num))
|
||||
print("第{}次排队中,请耐心等待".format(num+1))
|
||||
else:
|
||||
print("排队中")
|
||||
time.sleep(2)
|
||||
|
|
|
@ -88,8 +88,9 @@ class HTTPClient(object):
|
|||
else:
|
||||
method = "get"
|
||||
self.resetHeaders()
|
||||
logger.log(
|
||||
u"url: {0}\n入参: {1}\n请求方式: {2}\n".format(url,data,method,))
|
||||
if is_logger:
|
||||
logger.log(
|
||||
u"url: {0}\n入参: {1}\n请求方式: {2}\n".format(url,data,method,))
|
||||
for i in range(10):
|
||||
try:
|
||||
response = self._s.request(method=method,
|
||||
|
|
Loading…
Reference in New Issue