mirror of
https://github.com/Jerryplusy/rc-plugin.git
synced 2025-10-14 16:19:18 +00:00
🐞 fix: 修复老版本网易云分享链接解析错误问题
This commit is contained in:
parent
d7c23f2089
commit
c6a5e8c5c7
@ -1608,9 +1608,11 @@ export class tools extends plugin {
|
|||||||
// 处理网页链接
|
// 处理网页链接
|
||||||
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 musicUrlReg2 = /(http:|https:)\/\/y.music.163.com\/m\/song\?(.*)&id=(\d+)/;
|
const musicUrlReg2 = /(http:|https:)\/\/y.music.163.com\/m\/song\?(.*)&id=(\d+)/;
|
||||||
|
const musicUrlReg3 = /(http:|https:)\/\/music.163.com\/m\/song\/(\d+)/;
|
||||||
const id =
|
const id =
|
||||||
musicUrlReg2.exec(message)?.[3] ||
|
musicUrlReg2.exec(message)?.[3] ||
|
||||||
musicUrlReg.exec(message)?.[2] ||
|
musicUrlReg.exec(message)?.[2] ||
|
||||||
|
musicUrlReg3.exec(message)?.[2] ||
|
||||||
/id=(\d+)/.exec(message)[1];
|
/id=(\d+)/.exec(message)[1];
|
||||||
// 如果没有下载地址跳出if
|
// 如果没有下载地址跳出if
|
||||||
if (_.isEmpty(id)) {
|
if (_.isEmpty(id)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user