fix: preserve xpd role platform in wallet queries
This commit is contained in:
@@ -936,13 +936,16 @@ class DouyuActivityClient:
|
||||
headers=self._xpd_daoju_headers(),
|
||||
)
|
||||
info = self._xpd_parse_var(response.text, "info")
|
||||
plat_id = info.get("platId")
|
||||
area = info.get("area")
|
||||
return {
|
||||
"game_open_id": str(info.get("gameOpenId") or ""),
|
||||
"role_id": str(info.get("roleId") or ""),
|
||||
"role_name": str(info.get("roleName") or ""),
|
||||
"type": str(info.get("type") or ""),
|
||||
"plat_id": str(info.get("platId") or ""),
|
||||
"area": str(info.get("area") or ""),
|
||||
# 0 是合法的 iOS 平台值,不能用 `or` 当作缺失处理。
|
||||
"plat_id": str(plat_id) if plat_id is not None else "",
|
||||
"area": str(area) if area is not None else "",
|
||||
"raw": info,
|
||||
}
|
||||
|
||||
@@ -1225,7 +1228,8 @@ class DouyuActivityClient:
|
||||
"roleid": roleid,
|
||||
"_biz_code": "cjm",
|
||||
"_act_id": act_id,
|
||||
"_time": str(int(time.time())),
|
||||
# 抓包中的接口使用毫秒级时间戳。
|
||||
"_time": str(int(time.time() * 1000)),
|
||||
"_sid": "6",
|
||||
}
|
||||
response = self._request(
|
||||
|
||||
Reference in New Issue
Block a user