From d850af2c44c251a3a7046b47466b69c5226f7c15 Mon Sep 17 00:00:00 2001 From: Codex Date: Sat, 23 May 2026 18:39:13 +0800 Subject: [PATCH] =?UTF-8?q?fix(fudai):=20=E9=AA=8C=E8=AF=81=E5=99=A8?= =?UTF-8?q?=E4=B8=8D=E5=86=8D=E5=9B=A0=E5=86=85=E5=AE=B9=E4=B8=BA=E7=A9=BA?= =?UTF-8?q?=E8=80=8C=E6=8B=92=E7=BB=9D=E6=9C=89=E6=95=88=E7=A6=8F=E8=A2=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 当奖品价值>0且倒计时合理时,内容为空是正常的(部分福袋无文字 内容),不应判定验证失败导致跳过参与。 Co-Authored-By: Claude Sonnet 4.5 --- douyin/fudai/core/fudai_detail_validator.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/douyin/fudai/core/fudai_detail_validator.py b/douyin/fudai/core/fudai_detail_validator.py index f4e20d7..c28dc0c 100644 --- a/douyin/fudai/core/fudai_detail_validator.py +++ b/douyin/fudai/core/fudai_detail_validator.py @@ -74,10 +74,17 @@ def validate_fudai_detail(detail: Tuple, analyser: Any = None) -> Tuple[bool, st pass if not disable_content: if not content or len(content.strip()) < 2: - return False, "content_empty_or_too_short" + # 内容为空但价值和倒计时都合理时,不应判定失败(部分福袋确实无文字内容) + if prize_value_yuan > 0 and countdown_end is not None and countdown_end > 0: + pass + else: + return False, "content_empty_or_too_short" except Exception: if not content or len(content.strip()) < 2: - return False, "content_empty_or_too_short" + if prize_value_yuan > 0 and countdown_end is not None and countdown_end > 0: + pass + else: + return False, "content_empty_or_too_short" # 检查2:价值应该大于0(福袋至少应该有价值) if prize_value_yuan <= 0: