mirror of
https://github.com/Jerryplusy/rc-plugin.git
synced 2025-10-14 16:19:18 +00:00
🐞 fix: 修复网易云出现的iPad解析和Android、iPhone解析不一致的情况
This commit is contained in:
parent
acd500e454
commit
ecbde2185e
@ -644,7 +644,7 @@ export class tools extends plugin {
|
|||||||
async netease(e) {
|
async netease(e) {
|
||||||
const message = e.msg === undefined ? e.message.shift().data.replaceAll("\\", "") : e.msg.trim();
|
const message = e.msg === undefined ? e.message.shift().data.replaceAll("\\", "") : e.msg.trim();
|
||||||
const musicUrlReg = /(http:|https:)\/\/music.163.com\/song\/media\/outer\/url\?id=(\d+)/;
|
const musicUrlReg = /(http:|https:)\/\/music.163.com\/song\/media\/outer\/url\?id=(\d+)/;
|
||||||
const id = /id=(\d+)/.exec(message)[1] || musicUrlReg.exec(message)[2];
|
const id = musicUrlReg.exec(message)[2] || /id=(\d+)/.exec(message)[1];
|
||||||
console.log(id);
|
console.log(id);
|
||||||
fetch(`https://api.vvhan.com/api/music?id=${id}&type=song&media=netease`, {
|
fetch(`https://api.vvhan.com/api/music?id=${id}&type=song&media=netease`, {
|
||||||
headers: {
|
headers: {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user