修复虎牙手机号登录并统一部署项目名

This commit is contained in:
yml2213
2026-08-31 16:11:08 +08:00
parent 09ab80e062
commit 76b14b69b7
10 changed files with 223 additions and 20 deletions
+6 -1
View File
@@ -7,6 +7,7 @@ from __future__ import annotations
import json
import random
import re
import struct
import time as _time
from typing import Any
@@ -114,7 +115,11 @@ def _build_meta_json(session: int, trace_id: str) -> str:
def _make_name(uid_str: str) -> str:
"""登录名 = "hy_" + 虎牙号"""
"""构造 App 登录名:手机号原样提交,虎牙号使用 ``hy_`` 前缀"""
# App 协议对手机号和虎牙号使用不同的账号命名空间。手机号登录时
# name 就是 11 位手机号;只有数字虎牙号才需要 hy_ 前缀。
if re.fullmatch(r"1\d{10}", uid_str):
return uid_str
if uid_str.startswith("hy_"):
return uid_str
return "hy_" + uid_str