mirror of
https://github.com/Jerryplusy/rc-plugin.git
synced 2025-10-14 16:19:18 +00:00
✨ feat: V1.6.5 油管解析适配短链接(youtu.be)
This commit is contained in:
parent
71a77fb757
commit
a5a9b5c222
@ -134,7 +134,7 @@ export class tools extends plugin {
|
||||
fnc: "general",
|
||||
},
|
||||
{
|
||||
reg: "(youtube.com)",
|
||||
reg: "(youtube.com|youtu.be)",
|
||||
fnc: "y2b"
|
||||
},
|
||||
{
|
||||
@ -1086,7 +1086,9 @@ export class tools extends plugin {
|
||||
*/
|
||||
async y2b(e) {
|
||||
const urlRex = /(?:https?:\/\/)?(www\.)?youtube\.com\/[A-Za-z\d._?%&+\-=\/#]*/g;
|
||||
let url = urlRex.exec(e.msg)[0];
|
||||
// https://youtu.be/9IoNgzpURDw?si=XlvOAxqqjF9FJYcF
|
||||
const url2Rex = /(?:https?:\/\/)?youtu\.be\/[A-Za-z\d._?%&+\-=\/#]*/g;
|
||||
let url = urlRex.exec(e.msg)?.[0] || url2Rex.exec(e.msg)?.[0];
|
||||
// 判断海外
|
||||
const isOversea = await this.isOverseasServer();
|
||||
// 如果不是海外用户且没有梯子直接返回
|
||||
|
@ -1,5 +1,5 @@
|
||||
- {
|
||||
version: 1.6.4,
|
||||
version: 1.6.5,
|
||||
data:
|
||||
[
|
||||
新增<span class="cmd">B站扫码</span>功能,
|
||||
|
Loading…
x
Reference in New Issue
Block a user