添加虎牙自动注册
This commit is contained in:
@@ -54,7 +54,12 @@ class HuyaSmsCodeResult:
|
||||
|
||||
def normalize_huya_phone(phone: str) -> str:
|
||||
"""归一化虎牙短信接口手机号格式。"""
|
||||
digits = "".join(ch for ch in str(phone or "") if ch.isdigit())
|
||||
raw = str(phone or "").strip()
|
||||
digits = "".join(ch for ch in raw if ch.isdigit())
|
||||
if raw.startswith("+1") and len(digits) == 11:
|
||||
return f"001{digits[1:]}"
|
||||
if digits.startswith("001") and len(digits) == 13:
|
||||
return digits
|
||||
if digits.startswith("086"):
|
||||
return digits
|
||||
if digits.startswith("86") and len(digits) == 13:
|
||||
|
||||
Reference in New Issue
Block a user