fix image code

pull/569/head
文贤平 2019-09-03 11:08:53 +08:00
parent 6d9ebc9b8a
commit 632c77388c
2 changed files with 8 additions and 6 deletions

View File

@ -19,14 +19,14 @@ STATION_DATES = [
# 填入需要购买的车次(list)"G1353"
STATION_TRAINS = [
"G6142",
"",
]
# 出发城市,比如深圳北,就填深圳就搜得到
FROM_STATION = "深圳北"
FROM_STATION = ""
# 到达城市 比如深圳北,就填深圳就搜得到
TO_STATION = "隆回"
TO_STATION = ""
# 座位(list) 多个座位ex:
# "商务座",
@ -39,8 +39,7 @@ TO_STATION = "隆回"
# "无座",
# "动卧",
SET_TYPE = [
"商务座",
"一等座"
"",
]
# 当余票小于乘车人,如果选择优先提交,则删减联系人和余票数一致在提交
@ -129,4 +128,4 @@ PASSENGER_TICKER_STR = {
}
# 软件版本
RE_VERSION = "1.0.101"
RE_VERSION = "1.1.102"

View File

@ -53,6 +53,9 @@ def getPassCodeNewOrderAndLogin1(session, imgType):
print(u"下载验证码...")
img_path = './tkcode.png'
codeImgUrlRsp = session.httpClint.send(codeImgUrl)
if not isinstance(codeImgUrlRsp, str):
print("验证码获取失败")
return
result = eval(codeImgUrlRsp.split("(")[1].split(")")[0]).get("image")
try:
if isinstance(result, dict):