fix: 修复日限额问题

This commit is contained in:
danial
2024-08-23 09:15:11 +08:00
parent 9be03e530a
commit c72969a8be
3 changed files with 8 additions and 1 deletions

1
README.md Normal file
View File

@@ -0,0 +1 @@
### iTunes登录脚本

View File

@@ -1,4 +1,4 @@
FROM python:3.11-slim FROM python:3.12-slim
COPY . /app COPY . /app
WORKDIR /app WORKDIR /app

View File

@@ -231,10 +231,16 @@ class AppleClient:
result.errorMessageKey result.errorMessageKey
== "MZCommerce.GiftCertificateAlreadyRedeemed" == "MZCommerce.GiftCertificateAlreadyRedeemed"
): ):
# 已经被兑换
result.status = 12 result.status = 12
elif result.errorMessageKey == "MZFreeProductCode.NoSuch": elif result.errorMessageKey == "MZFreeProductCode.NoSuch":
# 没有这个卡密
result.status = 11 result.status = 11
elif result.errorMessageKey == "MZCommerce.NatIdYearlyCapExceededException": elif result.errorMessageKey == "MZCommerce.NatIdYearlyCapExceededException":
# 年限额
result.status = 31
elif result.errorMessageKey == "MZCommerce.NatIdDailyCapExceededException":
# 日限额
result.status = 31 result.status = 31
else: else:
logger.error(f"失败状态未知:{response.json()}") logger.error(f"失败状态未知:{response.json()}")