修复虎牙手机号登录并统一部署项目名
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user