This commit is contained in:
Your Name
2026-09-01 15:31:05 +08:00
parent 1f3addcf79
commit 2fc864cc00
20 changed files with 1381 additions and 45 deletions
+6 -1
View File
@@ -102,11 +102,16 @@ def resolve_frontier_device_id(session: DouyinImSession) -> str:
return ""
def _ws_device_id(url: str) -> str:
def ws_device_id(url: str) -> str:
"""frontier 推送的寻址键:设备号(不是账号 UID)。"""
m = re.search(r"[?&]device_id=([^&\s]+)", url or "")
return unquote(m.group(1)) if m else ""
# 兼容内部旧引用
_ws_device_id = ws_device_id
def _ws_device_matches_session(session: DouyinImSession, url: str) -> bool:
ws_dev = _ws_device_id(url)
if not ws_dev or not ws_dev.isdigit():