fix: use correct danmaku XML endpoint (comment.bilibili.com/{cid}.xml)

This commit is contained in:
Developer
2026-03-11 10:23:47 +08:00
parent ea184842e4
commit 4d7f943618

View File

@@ -174,8 +174,7 @@ export async function pollQRCode(qrcode_key: string): Promise<{ code: number; co
export async function getDanmaku(cid: number): Promise<DanmakuItem[]> {
try {
const res = await axios.get(`${COMMENT_BASE}/x/v1/dm/list.so`, {
params: { oid: cid },
const res = await axios.get(`${COMMENT_BASE}/${cid}.xml`, {
headers: isWeb ? {} : { Referer: 'https://www.bilibili.com', 'User-Agent': UA },
responseType: 'text',
});