yz-yuki-plugin 2.0.9-9 → 2.0.10-1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,4 +1,8 @@
1
+ # 2.0.10
2
+ * 更改搜索正则
3
+
1
4
  # 2.0.9
5
+ * fix: 修复B站私聊校验和ck获取失败问题,@Proito666
2
6
  * 修复哔哩cookie项混淆使用
3
7
  * 重构cookie管理
4
8
 
package/README.md CHANGED
@@ -181,8 +181,8 @@ https://m.weibo.cn/u/7643376782 # 7643376782 为崩坏星穹铁道博主uid
181
181
  | 查看B站订阅列表 | 查看本Bot所有的B站订阅列表,权限:Bot的Master | `#B站全部订阅列表` |
182
182
  | 查看本群/私聊B站订阅列表 | 查看 本群/私聊 添加的B站订阅列表 | `#B站订阅列表` |
183
183
  | 手动推送B站订阅 | 手动触发定时推送任务,权限:Bot的Master | `#执行B站任务` |
184
- | 查看up信息 | 通过uid查看up信息 | `#B站up主 uid` |
185
- | 搜索B站up主 | 根据昵称在b站搜索up信息 | `#搜索B站upxxx` |
184
+ | 查看up信息 | 通过uid查看up信息 | `#B站up主uid:xxx` |
185
+ | 搜索B站up主 | 根据昵称在b站搜索up信息 | `#B站up主昵称:xxx` |
186
186
  | 扫码B站登录 | app扫码获取登录ck | `#扫码B站登录` |
187
187
  | 取消B站登录 | 删除扫码获取的B站CK | `#取消B站登陆` |
188
188
  | 查看B站登录信息 | 查看app扫码登录的信息和状态 | `#我的B站登录` |
@@ -198,8 +198,8 @@ https://m.weibo.cn/u/7643376782 # 7643376782 为崩坏星穹铁道博主uid
198
198
  | 查看微博订阅列表 | 查看本Bot所有的微博订阅列表,权限:Bot的Master | `#微博全部订阅列表` |
199
199
  | 查看本群/私聊微博订阅列表 | 查看 本群/私聊 添加的微博订阅列表 | `#微博订阅列表` |
200
200
  | 手动推送微博订阅 | 手动触发定时推送任务,权限:Bot的Master | `#执行微博任务` |
201
- | 查看博主信息 | 通过uid查看博主信息 | `#微博博主 uid` |
202
- | 搜索微博博主 | 根据关键词在微博搜索大V博主的信息 | `#搜索微博博主 xxx` |
201
+ | 查看博主信息 | 通过uid查看博主信息 | `#微博博主uid:xxx` |
202
+ | 搜索微博博主 | 根据关键词在微博搜索大V博主的信息 | `#微博博主昵称:xxx` |
203
203
  | 扫码微博登录(待完成) | app扫码获取登录ck | `#扫码微博登录` |
204
204
  | 取消微博登录 | 删除扫码获取的微博CK | `#取消微博登陆` |
205
205
  | 查看微博登录信息 | 查看app扫码登录的信息和状态 | `#我的微博登录` |
@@ -24,10 +24,10 @@
24
24
  title: '#执行B站任务'
25
25
  desc: '手动触发定时推送任务'
26
26
  - icon: flower_2
27
- title: '#B站up主UID'
27
+ title: '#B站up主UID:401742377'
28
28
  desc: '通过uid查看up信息'
29
29
  - icon: shell
30
- title: '#搜索B站up主原神'
30
+ title: '#B站up主昵称:原神'
31
31
  desc: '用昵称在b站搜索up信息'
32
32
  - icon: 雷神瞳共鸣石
33
33
  title: '#扫码B站登录'
@@ -71,10 +71,10 @@
71
71
  title: '#执行微博任务'
72
72
  desc: '手动触发定时推送任务'
73
73
  - icon: flower_2
74
- title: '#微博博主UID'
74
+ title: '#微博博主UID:6593199887'
75
75
  desc: '通过uid查看博主信息'
76
76
  - icon: shell
77
- title: '#搜索微博博主原神'
77
+ title: '#微博博主昵称:原神'
78
78
  desc: '根据关键词在微博搜索大V博主的信息'
79
79
  - icon: 雷神瞳共鸣石
80
80
  title: '#扫码微博登录'
@@ -200,12 +200,12 @@ message.use(async (e) => {
200
200
  /** 手动绑定本地获取的B站cookie */
201
201
  message.use(async (e) => {
202
202
  if (e.isMaster) {
203
- if (e.isPrivate) {
203
+ if (!e.isPrivate) {
204
204
  await e.reply('请注意账号安全,请手动撤回发送的cookie,并私聊进行添加绑定!');
205
205
  }
206
206
  else {
207
207
  let localBiliCookie = e.msg
208
- .replace(/^(#|\/)(yuki|优纪)?(绑定|添加|ADD|add)(b站|B站|bili|bilibili|哔哩|哔哩哔哩)(ck|CK|cookie|COOKIE)(:|:)?/g, '')
208
+ .replace(/^(#|\/)(yuki|优纪)?(绑定|添加|ADD|add)(b站|B站|bili|bilibili|哔哩|哔哩哔哩)本地(ck|CK|cookie|COOKIE)(:|:)?/g, '')
209
209
  .trim();
210
210
  let param = {};
211
211
  localBiliCookie.split(';').forEach(v => {
@@ -457,7 +457,7 @@ message.use(async (e) => {
457
457
  }, [/^(#|\/)(yuki|优纪)?(b站|B站|bili|bilibili|哔哩|哔哩哔哩)(推送|动态|订阅)列表$/]);
458
458
  /**通过uid获取up主信息 */
459
459
  message.use(async (e) => {
460
- let uid = e.msg.replace(/^(#|\/)(yuki|优纪)?(b站|B站|bili|bilibili|哔哩|哔哩哔哩)(up|UP)主/g, '').trim();
460
+ let uid = e.msg.replace(/^(#|\/)(yuki|优纪)?(b站|B站|bili|bilibili|哔哩|哔哩哔哩)(up|UP)主(uid|UID)(:|:)?/g, '').trim();
461
461
  const res = await new BilibiliWebDataFetcher(e).getBilibiUserInfoByUid(uid);
462
462
  if (res?.statusText !== 'OK') {
463
463
  e.reply('诶嘿,出了点网络问题,等会再试试吧~');
@@ -482,10 +482,10 @@ message.use(async (e) => {
482
482
  e.reply(`直播链接:${data?.live_room?.url}`);
483
483
  }
484
484
  e.reply(message);
485
- }, [/^(#|\/)(yuki|优纪)?(b站|B站|bili|bilibili|哔哩|哔哩哔哩)(up|UP)主.*$/]);
485
+ }, [/^(#|\/)(yuki|优纪)?(b站|B站|bili|bilibili|哔哩|哔哩哔哩)(up|UP)主(uid|UID)(:|:)?.*$/]);
486
486
  /** 根据名称搜索up的uid*/
487
487
  message.use(async (e) => {
488
- let keyword = e.msg.replace(/^(#|\/)(yuki|优纪)?搜索(b站|B站|bili|bilibili|哔哩|哔哩哔哩)(up|UP)主/g, '').trim();
488
+ let keyword = e.msg.replace(/^(#|\/)(yuki|优纪)?(b站|B站|bili|bilibili|哔哩|哔哩哔哩)(up|UP)主昵称(:|:)?/g, '').trim();
489
489
  const res = await new BilibiliWebDataFetcher(e).searchBiliUserInfoByKeyword(keyword);
490
490
  if (res?.statusText !== 'OK') {
491
491
  e.reply('诶嘿,出了点网络问题,等会再试试吧~');
@@ -514,7 +514,7 @@ message.use(async (e) => {
514
514
  messages.push(`${item.uname}\nUID:${item.mid}\n粉丝数:${item.fans}${index < 4 ? '\n' : ''}`);
515
515
  }
516
516
  e.reply(messages.join('\n'));
517
- }, [/^(#|\/)(yuki|优纪)?搜索(b站|B站|bili|bilibili|哔哩|哔哩哔哩)(up|UP)主.*$/]);
517
+ }, [/^(#|\/)(yuki|优纪)?(b站|B站|bili|bilibili|哔哩|哔哩哔哩)(up|UP)主昵称(:|:)?.*$/]);
518
518
  /** 根据名称搜索up的uid*/
519
519
  message.use(async (e) => {
520
520
  let parseVideoLink = !!biliConfigData?.parseVideoLink === false ? false : true;
package/lib/apps/weibo.js CHANGED
@@ -271,7 +271,7 @@ message.use(async (e) => {
271
271
  }, [/^(#|\/)(yuki|优纪)?(微博|weibo|WEIBO)(推送|动态|订阅)列表$/]);
272
272
  /**通过uid获取up主信息 */
273
273
  message.use(async (e) => {
274
- let uid = e.msg.replace(/^(#|\/)(yuki|优纪)?(微博|weibo|WEIBO)(博|bo|BO)主/g, '').trim();
274
+ let uid = e.msg.replace(/^(#|\/)(yuki|优纪)?(微博|weibo|WEIBO)(博|bo|BO)主(uid|UID)(:|:)?/g, '').trim();
275
275
  const res = await new WeiboWebDataFetcher(e).getBloggerInfo(uid);
276
276
  if (res?.statusText !== 'OK') {
277
277
  e.reply('诶嘿,出了点网络问题,等会再试试吧~');
@@ -297,10 +297,10 @@ message.use(async (e) => {
297
297
  `\n粉丝人数:${userInfo.followers_count_str || ''}`
298
298
  ];
299
299
  e.reply(message);
300
- }, [/^(#|\/)(yuki|优纪)?(微博|weibo|WEIBO)(博|bo|BO)主.*$/]);
300
+ }, [/^(#|\/)(yuki|优纪)?(微博|weibo|WEIBO)(博|bo|BO)主(uid|UID)(:|:)?.*$/]);
301
301
  /** 根据昵称搜索博主信息*/
302
302
  message.use(async (e) => {
303
- let keyword = e.msg.replace(/^(#|\/)(yuki|优纪)?搜索(微博|weibo|WEIBO)(博|bo|BO)主/g, '').trim();
303
+ let keyword = e.msg.replace(/^(#|\/)(yuki|优纪)?(微博|weibo|WEIBO)(博|bo|BO)主昵称(:|:)?/g, '').trim();
304
304
  const res = await new WeiboWebDataFetcher(e).searchBloggerInfo(keyword);
305
305
  if (res?.statusText !== 'OK') {
306
306
  e.reply('诶嘿,出了点网络问题,等会再试试吧~');
@@ -325,7 +325,7 @@ message.use(async (e) => {
325
325
  messages.push(`\n------------------\n博主昵称:${screen_name}\nUID:${id}\n粉丝人数:${followers_count || ''}`);
326
326
  }
327
327
  e.reply(messages.join('\n'));
328
- }, [/^(#|\/)(yuki|优纪)?搜索(微博|weibo|WEIBO)(博|bo|BO)主.*$/]);
328
+ }, [/^(#|\/)(yuki|优纪)?(微博|weibo|WEIBO)(博|bo|BO)主昵称(:|:)?.*$/]);
329
329
  const YukiWeibo = message.ok;
330
330
 
331
331
  export { YukiWeibo };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yz-yuki-plugin",
3
- "version": "2.0.9-9",
3
+ "version": "2.0.10-1",
4
4
  "description": "优纪插件,yunzaijs 关于 微博推送、B站推送 等功能的拓展插件",
5
5
  "author": "snowtafir",
6
6
  "type": "module",