- 新增 5sing/apple/xm/me/qt/lr 平台包与取流实现(含 xm-sign、MissEvan 签名、蜻蜓 HMAC、Apple developer token) - 新增 wy/kg/tx/lr 登录:扫码、手机号、账密(kg 20028 风控指纹)、cookie 绑定、kg/tx 续期 - request 层:保留多值 Set-Cookie;JSON body 紧凑化(修复 kg 网关验签);直连不经系统代理(对齐 Node) - 登录路由统一 Body(embed=True),修复扫码轮询 422;lifespan 接入登录续期调度 - ruff/format/pyright 全绿;14 平台真实联网与 HTTP 路由验证通过
20 lines
554 B
Python
20 lines
554 B
Python
"""网易云封面(移植自 sdk/wy/index.ts 的 getPic → musicInfo.ts 的 song_detail)。
|
|
|
|
原文行为:取 song/detail 的 `al.picUrl`,失败即报错(无降级链)。
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
from typing import Any
|
|
|
|
from app.sdk.platforms.wy.music_info import get_music_info
|
|
|
|
|
|
async def get_pic(song_info: dict[str, Any]) -> str:
|
|
info = await get_music_info(song_info)
|
|
album = info.get("al") or {}
|
|
url = album.get("picUrl")
|
|
if not url:
|
|
raise RuntimeError("获取封面失败")
|
|
return str(url)
|