diff --git a/.gitignore b/.gitignore index 5667af5..85d9223 100644 --- a/.gitignore +++ b/.gitignore @@ -33,3 +33,4 @@ data/web.db .reasonix/ .tmp_reverse/ apks/ +evidence/qr_login_success.json diff --git a/core/huya/verification/solver.py b/core/huya/verification/solver.py index f022f43..dc6c6b9 100644 --- a/core/huya/verification/solver.py +++ b/core/huya/verification/solver.py @@ -278,12 +278,13 @@ class HuyaVerificationSolver: except Exception: # noqa: BLE001 pass strategy_url_lower = strategy_url.lower() - is_qr_auth = "qr_auth" in strategy_url_lower or any( - isinstance(s, dict) and str(s.get("strategy")) == "64" for s in strategies - ) + # 判定依据是 URL 路径,不是 strategy 数值。 + # 实测(2026-08-25): strategy=64 时 pt_auth.html 是滑块、qr_auth.html 才是扫码, + # 旧的 `strategy==64 → 扫码` 硬编码会把可自动化的滑块误杀成死路。 + is_qr_auth = "qr_auth" in strategy_url_lower if is_qr_auth and "dx_auth" not in strategy_url_lower: raise HuyaQrAuthRequiredError( - "虎牙风控要求扫码验证(qr_auth/strategy=64),需已登录App设备确认," + "虎牙风控要求扫码验证(qr_auth),需已登录App设备确认," f"账号: {self.url_param_map.get('mobile', '?')}" ) if "dx_auth" in strategy_url_lower: