feat: 新增新的 wb 链接适配

This commit is contained in:
zhiyu1998 2024-05-28 18:39:15 +08:00
parent 2868d3701e
commit 479efae0c4

View File

@ -1047,7 +1047,7 @@ export class tools extends plugin {
// 对已知情况进行判断
if (e.msg.includes("m.weibo.cn")) {
// https://m.weibo.cn/detail/4976424138313924
weiboId = /(?<=detail\/)[A-Za-z\d]+/.exec(e.msg)?.[0];
weiboId = /(?<=detail\/)[A-Za-z\d]+/.exec(e.msg)?.[0] || /(?<=m.weibo.cn\/)[A-Za-z\d]+\/[A-Za-z\d]+/.exec(e.msg)?.[0];
} else if (e.msg.includes("weibo.com\/tv\/show") && e.msg.includes("mid=")) {
// https://weibo.com/tv/show/1034:5007449447661594?mid=5007452630158934
weiboId = /(?<=mid=)[A-Za-z\d]+/.exec(e.msg)?.[0];