mirror of
https://gh-proxy.org/https://github.com/tiajinsha/JKVideo
synced 2026-07-08 23:43:52 +08:00
fix: use correct danmaku XML endpoint (comment.bilibili.com/{cid}.xml)
This commit is contained in:
@@ -174,8 +174,7 @@ export async function pollQRCode(qrcode_key: string): Promise<{ code: number; co
|
|||||||
|
|
||||||
export async function getDanmaku(cid: number): Promise<DanmakuItem[]> {
|
export async function getDanmaku(cid: number): Promise<DanmakuItem[]> {
|
||||||
try {
|
try {
|
||||||
const res = await axios.get(`${COMMENT_BASE}/x/v1/dm/list.so`, {
|
const res = await axios.get(`${COMMENT_BASE}/${cid}.xml`, {
|
||||||
params: { oid: cid },
|
|
||||||
headers: isWeb ? {} : { Referer: 'https://www.bilibili.com', 'User-Agent': UA },
|
headers: isWeb ? {} : { Referer: 'https://www.bilibili.com', 'User-Agent': UA },
|
||||||
responseType: 'text',
|
responseType: 'text',
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user