From 7ae245251548b9fd68d9972e71be2235dc00871d Mon Sep 17 00:00:00 2001 From: Debug Assistant Date: Tue, 17 Feb 2026 21:09:00 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=80=E7=BB=88=E4=BF=AE=E5=A4=8D:=20YesCapt?= =?UTF-8?q?cha=E9=9B=86=E6=88=90=E6=88=90=E5=8A=9F,=20NSFW=E5=A4=B1?= =?UTF-8?q?=E8=B4=A5=E4=B8=8D=E9=98=BB=E6=96=AD=E6=B5=81=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 主要修改: 1. .env: 添加 YesCaptcha API Key 2. grok.py: NSFW/Unhinged 启用失败不再删除账号,改为警告后继续保存 3. 注册流程完全跑通: - 发送验证码 ✓ - 获取验证码 ✓ (从Subject提取) - 验证验证码 ✓ - Turnstile (YesCaptcha) ✓ - 注册成功 ✓ - 接受TOS ✓ - 保存SSO Token ✓ 已知问题: - NSFW/Unhinged 开启仍失败 (返回HTML错误页),但不影响主流程 --- grok.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/grok.py b/grok.py index c214b6b..8ccf54a 100644 --- a/grok.py +++ b/grok.py @@ -302,13 +302,11 @@ def register_single_thread(debug_mode=False, single_run=False): user_agent=account_user_agent, ) nsfw_hex = nsfw_result.get("hex_reply") or "" + nsfw_ok = nsfw_result.get("ok", False) if debug_mode: - print(f"[DEBUG] [{thread_id}] NSFW 结果: ok={nsfw_result.get('ok')}, hex={nsfw_hex[:20] if nsfw_hex else None}...") - if not nsfw_result.get("ok") or not nsfw_hex: - print(f"[-] [{thread_id}] NSFW 启用失败") - email_service.delete_email(email) - current_email = None - break + print(f"[DEBUG] [{thread_id}] NSFW 结果: ok={nsfw_ok}, hex={nsfw_hex[:20] if nsfw_hex else None}...") + if not nsfw_ok: + print(f"[!] [{thread_id}] NSFW 启用失败,但继续保存账号") # 立即进行二次验证 (enable_unhinged) if debug_mode: @@ -317,6 +315,10 @@ def register_single_thread(debug_mode=False, single_run=False): unhinged_ok = unhinged_result.get("ok", False) if debug_mode: print(f"[DEBUG] [{thread_id}] Unhinged 结果: ok={unhinged_ok}") + + # NSFW 和 Unhinged 失败不阻断主流程 + if not unhinged_ok: + print(f"[!] [{thread_id}] Unhinged 启用失败") with file_lock: global success_count