完善虎牙外部单展示、状态恢复与礼包配置

This commit is contained in:
yml2213
2026-11-11 12:40:06 +08:00
parent 3a48d9c624
commit b18e46d72d
18 changed files with 1216 additions and 120 deletions
+12
View File
@@ -16,6 +16,7 @@
"""
import asyncio
import json
import random
import re
from collections.abc import Callable
@@ -1451,6 +1452,9 @@ class HuyaWssClient:
cookie: str,
source_id: str = "yellowcarlist",
page_code: str = POINTS_PAGE_CODE,
scene: int = SHOP_APP_SCENE,
page_id: int = 0,
waterfall_tab_id: int | str | None = None,
*,
deep: bool = False,
):
@@ -1464,7 +1468,15 @@ class HuyaWssClient:
req = PlayMallQueryAllocationReq()
req.userId = self._build_biz_user(uid, cookie)
req.appInfo = self._build_play_mall_app(source_id)
req.appInfo.scene = int(scene or SHOP_APP_SCENE)
req.pageCode = page_code
if waterfall_tab_id not in (None, ""):
req.blank7 = json.dumps(
{"waterfallTabId": str(waterfall_tab_id)},
separators=(",", ":"),
)
req.flag9 = int(page_id or 0)
req.flags11 = []
if not deep:
return await self.call_rpc_raw("PlayMallUI", "queryAllocation", req)
body = await self.call_rpc("PlayMallUI", "queryAllocation", req, None)