🐞 fix: 修复网易云音乐解析出错

This commit is contained in:
zhiyu1998 2024-06-07 22:34:41 +08:00
parent 1ee370c336
commit 720cfada4d
2 changed files with 6 additions and 4 deletions

View File

@ -54,7 +54,7 @@ import {
BILI_SUMMARY, BILI_SUMMARY,
DY_INFO, DY_INFO,
GENERAL_REQ_LINK, GENERAL_REQ_LINK,
MIYOUSHE_ARTICLE, MIYOUSHE_ARTICLE, NETEASE_API_CN,
NETEASE_SONG_DETAIL, NETEASE_SONG_DETAIL,
NETEASE_SONG_DOWNLOAD, NETEASE_TEMP_API, NETEASE_SONG_DOWNLOAD, NETEASE_TEMP_API,
TIKTOK_INFO, TIKTOK_INFO,
@ -991,9 +991,9 @@ export class tools extends plugin {
} }
// 判断海外 // 判断海外
const isOversea = await this.isOverseasServer(); const isOversea = await this.isOverseasServer();
// 国内解决方案替换为国内API // 国内解决方案替换为国内API (其中NETEASE_API_CN是国内基址)
const AUTO_NETEASE_SONG_DOWNLOAD = isOversea ? NETEASE_SONG_DOWNLOAD : `http://cloud-music.pl-fe.cn/song/url?id={}`; const AUTO_NETEASE_SONG_DOWNLOAD = isOversea ? NETEASE_SONG_DOWNLOAD : `${NETEASE_API_CN}/song/url?id={}`;
const AUTO_NETEASE_SONG_DETAIL = isOversea ? NETEASE_SONG_DETAIL : `http://cloud-music.pl-fe.cn/song/detail?ids={}`; const AUTO_NETEASE_SONG_DETAIL = isOversea ? NETEASE_SONG_DETAIL : `${NETEASE_API_CN}/song/detail?ids={}`;
logger.info(AUTO_NETEASE_SONG_DOWNLOAD.replace("{}", id)); logger.info(AUTO_NETEASE_SONG_DOWNLOAD.replace("{}", id));
// 请求netease数据 // 请求netease数据
axios.get(AUTO_NETEASE_SONG_DOWNLOAD.replace("{}", id), { axios.get(AUTO_NETEASE_SONG_DOWNLOAD.replace("{}", id), {

View File

@ -121,6 +121,8 @@ export const NETEASE_SONG_DOWNLOAD = "https://neteasecloudmusicapi.vercel.app/so
*/ */
export const NETEASE_SONG_DETAIL = "https://neteasecloudmusicapi.vercel.app/song/detail?ids={}" export const NETEASE_SONG_DETAIL = "https://neteasecloudmusicapi.vercel.app/song/detail?ids={}"
export const NETEASE_API_CN = 'https://mu-api.yuk0.com';
/** /**
* 下载VIP的临时接口 (感谢桑帛云API如果站长能看到) * 下载VIP的临时接口 (感谢桑帛云API如果站长能看到)
* 备用另外一个兜底策略https://www.hhlqilongzhu.cn/api/dg_wyymusic.php?gm={搜索内容}&n=1&type=json * 备用另外一个兜底策略https://www.hhlqilongzhu.cn/api/dg_wyymusic.php?gm={搜索内容}&n=1&type=json