diff --git a/tab/go.py b/tab/go.py index 807d0a8..ea90b4b 100644 --- a/tab/go.py +++ b/tab/go.py @@ -563,6 +563,7 @@ def run_validation(): @retry.retry(exceptions=RequestException, tries=60, delay=interval / 1000) def inner_request(): + nonlocal payload if not isRunning: raise ValueError("抢票结束") ret = _request.post( @@ -573,6 +574,12 @@ def inner_request(): logger.info( f'状态码: {err}({ERRNO_DICT.get(err, "未知错误码")}), 请求体: {ret}' ) + if err == 100034: + logger.info( + f'更新票价为:{ret["data"]["pay_money"] / 100}' + ) + tickets_info["pay_money"] = ret["data"]["pay_money"] + payload = format_dictionary_to_string(tickets_info) if err == 0 or err == 100048 or err == 100079: return ret, err if err == 100051: diff --git a/util/error.py b/util/error.py index 1bce2d6..a4ef1ea 100644 --- a/util/error.py +++ b/util/error.py @@ -12,7 +12,8 @@ 100039: "活动收摊啦,下次要快点哦", 100048: "已经下单,有尚未完成订单", 100017: "票种不可售", - 100051: "订单准备过期,重新验证" + 100051: "订单准备过期,重新验证", + 100034: "票价错误" }