koishi-plugin-bilibili-notify 1.2.9-alpha.0 → 1.2.10

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/lib/biliAPI.js CHANGED
@@ -152,16 +152,11 @@ class BiliAPI extends koishi_1.Service {
152
152
  disposeNotifier() { this.loginNotifier && this.loginNotifier.dispose(); }
153
153
  getRandomUserAgent() {
154
154
  const userAgents = [
155
- // Chrome
156
- 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.102 Safari/537.36',
157
- // Firefox
158
- 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:97.0) Gecko/20100101 Firefox/97.0',
159
- // Safari
160
- 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.3 Safari/605.1.15',
161
- // Internet Explorer
162
- 'Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; AS; rv:11.0) like Gecko',
163
- // Edge
164
- 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.102 Safari/537.36 Edg/98.0.1108.62',
155
+ 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36',
156
+ 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36',
157
+ 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36',
158
+ 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36 Edg/123.0.0.0',
159
+ 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36'
165
160
  ];
166
161
  const index = Math.floor(Math.random() * userAgents.length);
167
162
  return userAgents[index];
@@ -791,7 +791,7 @@ class ComRegister {
791
791
  await this.sendPrivateMsg(bot, '账号未登录,请登录后重新订阅动态');
792
792
  break;
793
793
  }
794
- default: await this.sendPrivateMsg(bot, '获取动态信息错误,错误为:' + content.message); // 未知错误
794
+ default: await this.sendPrivateMsg(bot, '获取动态信息错误,错误码为:' + content.code + ',错误为:' + content.message); // 未知错误
795
795
  }
796
796
  // 取消订阅
797
797
  this.unsubSingle(ctx, uid, 1); /* 1为取消动态订阅 */
@@ -850,12 +850,12 @@ class ComRegister {
850
850
  const dUrl = this.config.dynamicUrl ? `${upName}发布了一条动态:https://t.bilibili.com/${dynamicId}` : '';
851
851
  // 如果pic存在,则直接返回pic
852
852
  if (pic) {
853
- console.log('render mode');
853
+ this.logger.info('推送动态中,使用render模式');
854
854
  // pic存在,使用的是render模式
855
855
  await this.sendMsg(ctx, guildId, bot, pic + (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: dUrl }));
856
856
  }
857
857
  else {
858
- console.log('page mode');
858
+ this.logger.info('推送动态中,使用page模式');
859
859
  // pic不存在,说明使用的是page模式
860
860
  await this.sendMsg(ctx, guildId, bot, (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("img", { src: 'data:image/png;base64,' + buffer.toString('base64') }), " ", dUrl] }));
861
861
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "koishi-plugin-bilibili-notify",
3
3
  "description": "Koishi bilibili notify plugin",
4
- "version": "1.2.9-alpha.0",
4
+ "version": "1.2.10",
5
5
  "contributors": [
6
6
  "Akokko <admin@akokko.com>"
7
7
  ],
package/readme.md CHANGED
@@ -143,6 +143,7 @@
143
143
  - ver 1.2.7 修复不论选择什么渲染模式都是render模式的bug,优化直播卡片推送逻辑
144
144
  - ver 1.2.8 修复例如像UP主籽岷使用webp格式的头像,下播通知无法发出的bug
145
145
  - ver 1.2.9-alpha.0 bug测试版本,请跳过
146
+ - ver 1.2.10 修复插件启动一段时间后一直报错的问题,更新了UA列表,新增了更多日志输出
146
147
 
147
148
  ## 交流群
148
149