mirror of
https://github.com/Jerryplusy/rc-plugin.git
synced 2025-10-14 16:19:18 +00:00
🐞 fix: V1.3.1 修复油管解析bug
修复油管解析无法匹配youtube.com的情况
This commit is contained in:
parent
9c0aae9f48
commit
df30b619ca
@ -915,7 +915,7 @@ export class tools extends plugin {
|
|||||||
* @returns {Promise<void>}
|
* @returns {Promise<void>}
|
||||||
*/
|
*/
|
||||||
async y2b(e) {
|
async y2b(e) {
|
||||||
const urlRex = /(?:https?:\/\/)?www\.youtube\.com\/[A-Za-z\d._?%&+\-=\/#]*/g;
|
const urlRex = /(?:https?:\/\/)?(www\.)?youtube\.com\/[A-Za-z\d._?%&+\-=\/#]*/g;
|
||||||
let url = urlRex.exec(e.msg)[0];
|
let url = urlRex.exec(e.msg)[0];
|
||||||
// 获取url查询参数
|
// 获取url查询参数
|
||||||
const query = querystring.parse(url.split("?")[1]);
|
const query = querystring.parse(url.split("?")[1]);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user