diff --git a/agency/agency_tools.py b/agency/agency_tools.py index adff9a3..dcdcdb8 100644 --- a/agency/agency_tools.py +++ b/agency/agency_tools.py @@ -74,4 +74,4 @@ class proxy: if __name__ == "__main__": a = proxy() - a.main() \ No newline at end of file + a.get_filter_proxy() \ No newline at end of file diff --git a/config/ticketConf.py b/config/ticketConf.py index c5ccc12..401eae7 100644 --- a/config/ticketConf.py +++ b/config/ticketConf.py @@ -29,4 +29,4 @@ def _get_yaml(): # return _get_yaml()["damatu"] # # -# print _get_yaml()["set"]["12306count"][1]["pwd"] \ No newline at end of file +# print _get_yaml()["set"]["12306count"] \ No newline at end of file diff --git a/init/select_ticket_info.py b/init/select_ticket_info.py index 6defe99..e8b98d1 100644 --- a/init/select_ticket_info.py +++ b/init/select_ticket_info.py @@ -523,11 +523,20 @@ class select: print("等待出票中...") continue elif "msg" in queryOrderWaitTimeResult["data"] and queryOrderWaitTimeResult["data"]["msg"]: - print("订单提交失败:" + queryOrderWaitTimeResult["data"]["msg"]) - break + orderId = self.queryMyOrderNoComplete() + if orderId: + raise ticketIsExitsException( + ("恭喜您订票成功,订单号为:{0}, 请立即打开浏览器登录12306,访问‘未完成订单’,在30分钟内完成支付!".format(orderId))) + else: + break elif "messages" in queryOrderWaitTimeResult and queryOrderWaitTimeResult["messages"]: print("订单提交失败: " + queryOrderWaitTimeResult["messages"]) - break + orderId = self.queryMyOrderNoComplete() + if orderId: + raise ticketIsExitsException( + ("恭喜您订票成功,订单号为:{0}, 请立即打开浏览器登录12306,访问‘未完成订单’,在30分钟内完成支付!".format(orderId))) + else: + break else: print("订单提交中,请耐心等待") time.sleep(3)