mirror of
https://github.com/Jerryplusy/rc-plugin.git
synced 2025-10-14 08:09:19 +00:00
🐞 fix: 修复无法正取匹配问题
This commit is contained in:
parent
4ee740d14d
commit
e9ff3ab728
@ -295,12 +295,12 @@ export class songRequest extends plugin {
|
||||
const musicUrlReg2 = /(http:|https:)\/\/y.music.163.com\/m\/song\?(.*)&id=(\d+)/;
|
||||
const musicUrlReg3 = /(http:|https:)\/\/music.163.com\/m\/song\/(\d+)/;
|
||||
const id =
|
||||
musicUrlReg2.exec(msg.message[0].data)?.[3] ||
|
||||
musicUrlReg.exec(msg.message[0].data)?.[2] ||
|
||||
musicUrlReg3.exec(msg.message[0].data)?.[2] ||
|
||||
/(?<!user)id=(\d+)/.exec(msg.message[0].data)[1] || "";
|
||||
const title = msg.message[0].data.match(/"title":"([^"]+)"/)[1]
|
||||
const desc = msg.message[0].data.match(/"desc":"([^"]+)"/)[1]
|
||||
musicUrlReg2.exec(msg.message[0].data.data)?.[3] ||
|
||||
musicUrlReg.exec(msg.message[0].data.data)?.[2] ||
|
||||
musicUrlReg3.exec(msg.message[0].data.data)?.[2] ||
|
||||
/(?<!user)id=(\d+)/.exec(msg.message[0].data.data)[1] || "";
|
||||
const title = msg.message[0].data.data.match(/"title":"([^"]+)"/)[1]
|
||||
const desc = msg.message[0].data.data.match(/"desc":"([^"]+)"/)[1]
|
||||
if (id === "") return
|
||||
let path = this.getCurDownloadPath(e) + '/' + desc + '-' + title + '.' + FileSuffix
|
||||
try {
|
||||
@ -321,12 +321,12 @@ export class songRequest extends plugin {
|
||||
const musicUrlReg2 = /(http:|https:)\/\/y.music.163.com\/m\/song\?(.*)&id=(\d+)/;
|
||||
const musicUrlReg3 = /(http:|https:)\/\/music.163.com\/m\/song\/(\d+)/;
|
||||
const id =
|
||||
musicUrlReg2.exec(msg.message[0].data)?.[3] ||
|
||||
musicUrlReg.exec(msg.message[0].data)?.[2] ||
|
||||
musicUrlReg3.exec(msg.message[0].data)?.[2] ||
|
||||
/(?<!user)id=(\d+)/.exec(msg.message[0].data)[1] || "";
|
||||
const title = msg.message[0].data.match(/"title":"([^"]+)"/)[1]
|
||||
const desc = msg.message[0].data.match(/"desc":"([^"]+)"/)[1]
|
||||
musicUrlReg2.exec(msg.message[0].data.data)?.[3] ||
|
||||
musicUrlReg.exec(msg.message[0].data.data)?.[2] ||
|
||||
musicUrlReg3.exec(msg.message[0].data.data)?.[2] ||
|
||||
/(?<!user)id=(\d+)/.exec(msg.message[0].data.data)[1] || "";
|
||||
const title = msg.message[0].data.data.match(/"title":"([^"]+)"/)[1]
|
||||
const desc = msg.message[0].data.data.match(/"desc":"([^"]+)"/)[1]
|
||||
if (id === "") return
|
||||
let path = this.getCurDownloadPath(e) + '/' + desc + '-' + title + '.' + FileSuffix
|
||||
const tryUpload = async () => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user