mirror of
https://github.com/Jerryplusy/rc-plugin.git
synced 2025-10-14 08:09:19 +00:00
commit
5d8b644e31
@ -1432,7 +1432,7 @@ export class tools extends plugin {
|
||||
try {
|
||||
const urlRex = /(?:https?:\/\/)?(www\.|music\.)?youtube\.com\/[A-Za-z\d._?%&+\-=\/#]*/g;
|
||||
const url2Rex = /(?:https?:\/\/)?youtu\.be\/[A-Za-z\d._?%&+\-=\/#]*/g;
|
||||
let url = urlRex.exec(e.msg)?.[0] || url2Rex.exec(e.msg)?.[0];
|
||||
let url = urlRex.exec(e.msg)?.[0]?.replace(/&/g, '^&') || url2Rex.exec(e.msg)?.[0]?.replace(/&/g, '^&');
|
||||
// 适配 YouTube Music
|
||||
if (url.includes("music")) {
|
||||
// https://music.youtube.com/watch?v=F4sRtMoIgUs&si=7ZYrHjlI3fHAha0F
|
||||
|
Loading…
x
Reference in New Issue
Block a user