yz-yuki-plugin 2.0.7-2 → 2.0.7-20

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,10 @@
1
1
  # 2.0.7
2
+ * 新增动态内容过多时转发发送功能,默认开启
3
+ * 优化动态检查日志
4
+ * 优化文字动态内容及排版,修复微博视频图片混合的动态显示缺失问题
5
+ * 优化获取B站文章动态内容
6
+ * 优化订阅数据展示
7
+ * 修复同一up订阅多个群聊订阅,推送类型合并的问题
2
8
  * 添加白名单关键词过滤功能
3
9
  * 新增B站视频解析
4
10
 
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  # YUKI-PLUGIN
4
4
 
5
- - 一个适用于 `Yunzai 系列机器人框架` 的B站动态、B站视频链接解析和微博动态订阅推送的插件
5
+ - 一个适用于 `Yunzai 系列机器人框架` 的B站动态、微博动态订阅推送和B站视频链接解析的插件
6
6
 
7
7
  - 支持 群聊/私聊 订阅B站动态和微博动态,支持定时推送,支持手动触发推送,支持简单查询B站/微博用户信息。
8
8
 
@@ -36,7 +36,27 @@ chromium-browser --version
36
36
  ## 选择安装方式
37
37
  按照网络情况以及使用的bot框架是`Yunzaijs`还是`Yunzai-V3`,选择对应的安装方式。
38
38
 
39
- ### ***(一)YunzaiJS***
39
+ ### ***(一)Yunzai-V3***
40
+
41
+ > 仅支持Yunzai-V3(TRSS/Miao)的分支,选择仓库,安装到 `yunzai/plugins`:
42
+
43
+ gitee仓库:
44
+ ```
45
+ git clone --branch main3 https://gitee.com/snowtafir/yuki-plugin.git ./plugins/yuki-plugin
46
+ ```
47
+
48
+ github仓库:
49
+ ```
50
+ git clone --branch main3 https://github.com/snowtafir/yuki-plugin.git ./plugins/yuki-plugin
51
+ ```
52
+
53
+ * 安装依赖
54
+
55
+ ```shell
56
+ pnpm install --filter=yuki-plugin
57
+ ```
58
+
59
+ ### ***(二)YunzaiJS***
40
60
  > 选择其中一种方式安装插件:
41
61
 
42
62
  1. npm包安装到`yunzaijs/node_modules`的方式,仅YunzaiJS支持:
@@ -86,26 +106,6 @@ git clone --branch main https://github.com/snowtafir/yuki-plugin.git ./plugins/y
86
106
  yarn install
87
107
  ```
88
108
 
89
- ### ***(二)Yunzai-V3***
90
-
91
- > 仅支持Yunzai-V3(TRSS/Miao)的分支,选择仓库,安装到 `yunzai/plugins`:
92
-
93
- gitee仓库:
94
- ```
95
- git clone --branch main3 https://gitee.com/snowtafir/yuki-plugin.git ./plugins/yuki-plugin
96
- ```
97
-
98
- github仓库:
99
- ```
100
- git clone --branch main3 https://github.com/snowtafir/yuki-plugin.git ./plugins/yuki-plugin
101
- ```
102
-
103
- * 安装依赖
104
-
105
- ```shell
106
- pnpm install --filter=yuki-plugin
107
- ```
108
-
109
109
  # 📦二、插件配置
110
110
 
111
111
  > [!IMPORTANT]
@@ -255,3 +255,4 @@ yarn install
255
255
  | [TRSS-Yunzai](https://gitee.com/TimeRainStarSky/Yunzai) | 时雨🌌星空的 TRSS-Yunzai |
256
256
  | [Miao-Yunzai](https://gitee.com/yoimiya-kokomi/Miao-Yunzai) | 喵喵的 Miao-Yunzai |
257
257
  | [Yunzai-Bot](https://gitee.com/Le-niao/Yunzai-Bot) | 乐神的 Yunzai-Bot |
258
+ |[jsxp](https://github.com/lemonade-lab/lvyjs/tree/main/packages/jsxp) | 一个可以在 tsx 环境中,使用 puppeteer 对 tsx 组件进行截图的库 |
@@ -44,7 +44,7 @@ pushContentLineLimit: 5
44
44
  pushTaskLog: 1
45
45
 
46
46
  # 白名单关键词,命中即推送,不在白名单则不推送。
47
- # 白名单优先级高于黑名单,即命中白名单即推送,不在白名单则不推送。
47
+ # 白名单与黑名单共同起作用,即命中白名单但不命中黑名单即推送,不在白名单或命中黑名单则不推送。
48
48
  # 白名单为空则不启用白名单功能。
49
49
  # 配置示例:
50
50
  # whiteWordslist:
@@ -60,6 +60,9 @@ banWords:
60
60
  # 设置B站动态消息模式 0 文字模式 1 图片模式
61
61
  pushMsgMode: 1
62
62
 
63
+ # 动态过长(>300字)或条数过多(>2条)时是否以转发形式发送动态,默认 1 开启,0 关闭。
64
+ forwardSendDynamic: 1
65
+
63
66
  # 文字模式时,文字消息与图片附件是否合并在一起发送,默认 1 合并,0 不合并。
64
67
  # 如果合并时图片过多导致发送失败,可设置为 0 单独发送图片。
65
68
  mergeTextPic: 1
@@ -39,7 +39,7 @@ pushContentLineLimit: 5
39
39
  pushTaskLog: 1
40
40
 
41
41
  # 白名单关键词,命中即推送,不在白名单则不推送。
42
- # 白名单优先级高于黑名单,即命中白名单即推送,不在白名单则不推送。
42
+ # 白名单与黑名单共同起作用,即命中白名单但不命中黑名单即推送,不在白名单或命中黑名单则不推送。
43
43
  # 白名单为空则不启用白名单功能。
44
44
  # 配置示例:
45
45
  # whiteWordslist:
@@ -55,6 +55,9 @@ banWords:
55
55
  # 设置微博动态消息模式 0 文字模式 1 图片模式
56
56
  pushMsgMode: 1
57
57
 
58
+ # 动态过长(>300字)或条数过多(>2条)时是否以转发形式发送动态,默认 1 开启,0 关闭。
59
+ forwardSendDynamic: 1
60
+
58
61
  # 文字模式时,文字消息与图片附件是否合并在一起发送,默认 1 合并,0 不合并。
59
62
  # 如果合并时图片过多导致发送失败,可设置为 0 单独发送图片。
60
63
  mergeTextPic: 1
@@ -358,6 +358,17 @@ message.use(async (e) => {
358
358
  }
359
359
  else {
360
360
  let subData = Config.getConfigData('config', 'bilibili', 'push') || { group: {}, private: {} };
361
+ // 如果聊天ID没有订阅数据,则删除该聊天ID
362
+ for (let chatType in subData) {
363
+ if (subData.hasOwnProperty(chatType)) {
364
+ subData[chatType] = Object.keys(subData[chatType]).reduce((nonEmptyData, chatId) => {
365
+ if (subData[chatType][chatId].length > 0) {
366
+ nonEmptyData[chatId] = subData[chatType][chatId];
367
+ }
368
+ return nonEmptyData;
369
+ }, {});
370
+ }
371
+ }
361
372
  const messages = [];
362
373
  const typeMap = {
363
374
  DYNAMIC_TYPE_AV: '视频',
@@ -369,46 +380,67 @@ message.use(async (e) => {
369
380
  };
370
381
  // 处理群组订阅
371
382
  if (subData.group && Object.keys(subData.group).length > 0) {
372
- messages.push('------群组B站订阅------\n');
383
+ messages.push('\n>>>>>>群组B站订阅<<<<<<');
373
384
  Object.keys(subData.group).forEach(groupId => {
374
- messages.push(`群组ID:${groupId}:`);
375
- subData.group[groupId].forEach((item) => {
376
- const types = new Set();
377
- if (item.type && item.type.length) {
378
- item.type.forEach((typeItem) => {
379
- if (typeMap[typeItem]) {
380
- types.add(typeMap[typeItem]);
381
- }
382
- });
383
- }
384
- messages.push(`${item.name}:${item.uid} ${types.size ? `[${Array.from(types).join('、')}]` : ' [全部动态]'}`);
385
- });
385
+ messages.push(`\n<群组${groupId}>:`);
386
+ if (subData.group) {
387
+ subData.group[groupId].forEach((item) => {
388
+ const types = new Set();
389
+ if (item.type && item.type.length) {
390
+ item.type.forEach((typeItem) => {
391
+ if (typeMap[typeItem]) {
392
+ types.add(typeMap[typeItem]);
393
+ }
394
+ });
395
+ }
396
+ messages.push(`${item.uid}:${item.name} ${types.size ? `[${Array.from(types).join('、')}]` : ' [全部动态]'}`);
397
+ });
398
+ }
386
399
  });
387
400
  }
401
+ else {
402
+ messages.push('\n>>>>>>群组B站订阅<<<<<<\n当前没有任何群组订阅数据~');
403
+ }
388
404
  // 处理私聊订阅
389
405
  if (subData.private && Object.keys(subData.private).length > 0) {
390
- messages.push('\n------私聊B站订阅------');
406
+ messages.push('\n>>>>>>私聊B站订阅<<<<<<');
391
407
  Object.keys(subData.private).forEach(userId => {
392
- messages.push(`用户ID:${userId}:`);
393
- subData.private[userId].forEach((item) => {
394
- const types = new Set();
395
- if (item.type && item.type.length) {
396
- item.type.forEach((typeItem) => {
397
- if (typeMap[typeItem]) {
398
- types.add(typeMap[typeItem]);
399
- }
400
- });
401
- }
402
- messages.push(`${item.name}:${item.uid} ${types.size ? `[${Array.from(types).join('、')}]` : ' [全部动态]'}`);
403
- });
408
+ messages.push(`\n<用户${userId}>:`);
409
+ if (subData.private) {
410
+ subData.private[userId].forEach((item) => {
411
+ const types = new Set();
412
+ if (item.type && item.type.length) {
413
+ item.type.forEach((typeItem) => {
414
+ if (typeMap[typeItem]) {
415
+ types.add(typeMap[typeItem]);
416
+ }
417
+ });
418
+ }
419
+ messages.push(`${item.uid}:${item.name} ${types.size ? `[${Array.from(types).join('、')}]` : ' [全部动态]'}`);
420
+ });
421
+ }
404
422
  });
405
423
  }
424
+ else {
425
+ messages.push('\n>>>>>>私聊B站订阅<<<<<<\n当前没有任何私聊订阅数据~');
426
+ }
406
427
  e.reply(`推送列表如下:\n${messages.join('\n')}`);
407
428
  }
408
429
  }, [/^(#|\/)(yuki|优纪)?(b站|B站|bili|bilibili|哔哩|哔哩哔哩)全部(推送|动态|订阅)列表$/]);
409
430
  /** 单独群聊或私聊的订阅的b站推送列表 */
410
431
  message.use(async (e) => {
411
432
  let subData = Config.getConfigData('config', 'bilibili', 'push') || { group: {}, private: {} };
433
+ // 如果聊天ID没有订阅数据,则删除该聊天ID
434
+ for (let chatType in subData) {
435
+ if (subData.hasOwnProperty(chatType)) {
436
+ subData[chatType] = Object.keys(subData[chatType]).reduce((nonEmptyData, chatId) => {
437
+ if (subData[chatType][chatId].length > 0) {
438
+ nonEmptyData[chatId] = subData[chatType][chatId];
439
+ }
440
+ return nonEmptyData;
441
+ }, {});
442
+ }
443
+ }
412
444
  const messages = [];
413
445
  const typeMap = {
414
446
  DYNAMIC_TYPE_AV: '视频',
@@ -433,7 +465,7 @@ message.use(async (e) => {
433
465
  }
434
466
  });
435
467
  }
436
- messages.push(`${item.name}:${item.uid} ${types.size ? `[${Array.from(types).join('、')}]` : ' [全部动态]'}`);
468
+ messages.push(`${item.uid}:${item.name} ${types.size ? `[${Array.from(types).join('、')}]` : ' [全部动态]'}`);
437
469
  });
438
470
  e.reply(`推送列表如下:\n${messages.join('\n')}`);
439
471
  }, [/^(#|\/)(yuki|优纪)?(b站|B站|bili|bilibili|哔哩|哔哩哔哩)(推送|动态|订阅)列表$/]);
@@ -458,9 +490,9 @@ message.use(async (e) => {
458
490
  e.reply('用户不存在,输入的uid无效。');
459
491
  return;
460
492
  }
461
- const message = [`昵称:${data?.name}`, `\n性别:${data?.sex}`, `\n等级:${data?.level}`];
493
+ const message = [`--------------------`, `\n昵称:${data?.name}`, `\n性别:${data?.sex}`, `\n等级:${data?.level}`, `\n--------------------`];
462
494
  if (data.live_room) {
463
- message.push(`\n***********\n---直播信息---`, `\n直播标题:${data?.live_room?.title}`, `\n直播房间:${data?.live_room?.roomid}`, `\n直播状态:${data?.live_room?.liveStatus ? '直播中' : '未开播'}`, `\n观看人数:${data?.live_room?.watched_show?.num}人`);
495
+ message.push(`\n>>>>>直播间信息<<<<<`, `\n标题:${data?.live_room?.title}`, `\n房间:${data?.live_room?.roomid}`, `\n状态:${data?.live_room?.liveStatus ? '直播中' : '未开播'}`, `\n观看人数:${data?.live_room?.watched_show?.num}`);
464
496
  e.reply(`直播链接:${data?.live_room?.url}`);
465
497
  }
466
498
  e.reply(message);
@@ -499,9 +531,10 @@ message.use(async (e) => {
499
531
  }, [/^(#|\/)(yuki|优纪)?搜索(b站|B站|bili|bilibili|哔哩|哔哩哔哩)(up|UP)主.*$/]);
500
532
  /** 根据名称搜索up的uid*/
501
533
  message.use(async (e) => {
502
- if (biliConfigData?.parseVideoLink && !!biliConfigData.parseVideoLink === false) {
534
+ let parseVideoLink = !!biliConfigData?.parseVideoLink === false ? false : true;
535
+ if (parseVideoLink === false) {
503
536
  logger?.info(`优纪B站视频链接解析配置文件已设置关闭,解析终止。`);
504
- return;
537
+ return false;
505
538
  }
506
539
  const videoIDMatch = e.msg.match(/(b23\.tv\/([a-zA-Z0-9]+))|(www\.bilibili\.com\/video\/)?(av\d+|BV[a-zA-Z0-9]+)/);
507
540
  let videoID;
package/lib/apps/weibo.js CHANGED
@@ -86,16 +86,16 @@ message.use(async (e) => {
86
86
  return;
87
87
  }
88
88
  // 获取或初始化微博推送数据
89
- let data = weiboPushData || { group: {}, private: {} };
89
+ let subData = weiboPushData || { group: {}, private: {} };
90
90
  // 根据聊天类型初始化数据
91
91
  let chatType = e.isGroup ? 'group' : 'private';
92
92
  let chatId = e.isGroup ? e.group_id : e.user_id;
93
93
  // 初始化群组或私聊数据
94
- if (!data[chatType][chatId]) {
95
- data[chatType][chatId] = [];
94
+ if (!subData[chatType][chatId]) {
95
+ subData[chatType][chatId] = [];
96
96
  }
97
97
  // 查找指定UID的订阅数据
98
- const upData = data[chatType][chatId].find((item) => item.uid == uid);
98
+ const upData = subData[chatType][chatId].find((item) => item.uid == uid);
99
99
  if (!upData) {
100
100
  e.reply(`订阅列表中没有找到该UID~\n${uid}可能是无效的`);
101
101
  return;
@@ -105,7 +105,7 @@ message.use(async (e) => {
105
105
  let isDel = false;
106
106
  if (newType.length) {
107
107
  // 更新订阅类型
108
- data[chatType][chatId] = data[chatType][chatId].map(item => {
108
+ subData[chatType][chatId] = subData[chatType][chatId].map(item => {
109
109
  if (item.uid == uid) {
110
110
  item.type = newType;
111
111
  }
@@ -115,11 +115,11 @@ message.use(async (e) => {
115
115
  else {
116
116
  // 删除订阅
117
117
  isDel = true;
118
- data[chatType][chatId] = data[chatType][chatId].filter((item) => item.uid !== uid);
118
+ subData[chatType][chatId] = subData[chatType][chatId].filter((item) => item.uid !== uid);
119
119
  }
120
120
  // 保存更新后的数据
121
121
  //weiboPushData = data;
122
- Config.saveConfig('config', 'weibo', 'push', data);
122
+ Config.saveConfig('config', 'weibo', 'push', subData);
123
123
  // 回复用户操作结果
124
124
  e.reply(`${isDel ? '删除' : '修改'}微博推送成功~\n${uid}`);
125
125
  }
@@ -131,6 +131,17 @@ message.use(async (e) => {
131
131
  }
132
132
  else {
133
133
  let subData = weiboPushData || { group: {}, private: {} };
134
+ // 如果聊天ID没有订阅数据,则删除该聊天ID
135
+ for (let chatType in subData) {
136
+ if (subData.hasOwnProperty(chatType)) {
137
+ subData[chatType] = Object.keys(subData[chatType]).reduce((nonEmptyData, chatId) => {
138
+ if (subData[chatType][chatId].length > 0) {
139
+ nonEmptyData[chatId] = subData[chatType][chatId];
140
+ }
141
+ return nonEmptyData;
142
+ }, {});
143
+ }
144
+ }
134
145
  const messages = [];
135
146
  const typeMap = {
136
147
  DYNAMIC_TYPE_AV: '视频',
@@ -141,9 +152,9 @@ message.use(async (e) => {
141
152
  };
142
153
  // 处理群组订阅
143
154
  if (subData.group && Object.keys(subData.group).length > 0) {
144
- messages.push('------群组微博订阅------');
155
+ messages.push('\n>>>>>>群组微博订阅<<<<<<');
145
156
  Object.keys(subData.group).forEach(groupId => {
146
- messages.push(`群组ID:${groupId}:`);
157
+ messages.push(`\n<群组${groupId}>:`);
147
158
  subData.group[groupId].forEach((item) => {
148
159
  const types = new Set();
149
160
  if (item.type && item.type.length) {
@@ -153,15 +164,18 @@ message.use(async (e) => {
153
164
  }
154
165
  });
155
166
  }
156
- messages.push(`${item.name}:${item.uid} ${types.size ? `[${Array.from(types).join('、')}]` : ' [全部动态]'}`);
167
+ messages.push(`${item.uid}:${item.name} ${types.size ? `[${Array.from(types).join('、')}]` : ' [全部动态]'}`);
157
168
  });
158
169
  });
159
170
  }
171
+ else {
172
+ messages.push('\n>>>>>>群组微博订阅<<<<<<\n当前没有任何群组订阅数据~');
173
+ }
160
174
  // 处理私聊订阅
161
175
  if (subData.private && Object.keys(subData.private).length > 0) {
162
- messages.push('------私聊微博订阅------');
176
+ messages.push('\n>>>>>>私聊微博订阅<<<<<<');
163
177
  Object.keys(subData.private).forEach(userId => {
164
- messages.push(`用户ID:${userId}:`);
178
+ messages.push(`\n<用户${userId}>:`);
165
179
  subData.private[userId].forEach((item) => {
166
180
  const types = new Set();
167
181
  if (item.type && item.type.length) {
@@ -171,16 +185,30 @@ message.use(async (e) => {
171
185
  }
172
186
  });
173
187
  }
174
- messages.push(`${item.name}:${item.uid} ${types.size ? `[${Array.from(types).join('、')}]` : ' [全部动态]'}`);
188
+ messages.push(`${item.uid}:${item.name} ${types.size ? `[${Array.from(types).join('、')}]` : ' [全部动态]'}`);
175
189
  });
176
190
  });
177
191
  }
192
+ else {
193
+ messages.push('\n>>>>>>私聊微博订阅<<<<<<\n当前没有任何私聊订阅数据~');
194
+ }
178
195
  e.reply(`推送列表如下:\n${messages.join('\n')}`);
179
196
  }
180
197
  }, [/^(#|\/)(yuki|优纪)?(微博|weibo|WEIBO)全部(推送|动态|订阅)列表$/]);
181
198
  /** 单独群聊或私聊的订阅的b站推送列表 */
182
199
  message.use(async (e) => {
183
200
  let subData = weiboPushData || { group: {}, private: {} };
201
+ // 如果聊天ID没有订阅数据,则删除该聊天ID
202
+ for (let chatType in subData) {
203
+ if (subData.hasOwnProperty(chatType)) {
204
+ subData[chatType] = Object.keys(subData[chatType]).reduce((nonEmptyData, chatId) => {
205
+ if (subData[chatType][chatId].length > 0) {
206
+ nonEmptyData[chatId] = subData[chatType][chatId];
207
+ }
208
+ return nonEmptyData;
209
+ }, {});
210
+ }
211
+ }
184
212
  const messages = [];
185
213
  const typeMap = {
186
214
  DYNAMIC_TYPE_AV: '视频',
@@ -204,7 +232,7 @@ message.use(async (e) => {
204
232
  }
205
233
  });
206
234
  }
207
- messages.push(`${item.name}:${item.uid} ${types.size ? `[${Array.from(types).join('、')}]` : ' [全部动态]'}`);
235
+ messages.push(`${item.uid}:${item.name} ${types.size ? `[${Array.from(types).join('、')}]` : ' [全部动态]'}`);
208
236
  });
209
237
  e.reply(`推送列表如下:\n${messages.join('\n')}`);
210
238
  }, [/^(#|\/)(yuki|优纪)?(微博|weibo|WEIBO)(推送|动态|订阅)列表$/]);
@@ -83,9 +83,9 @@ const Content = ({ data }) => {
83
83
  contentCss,
84
84
  boxGrid,
85
85
  React.createElement("div", { className: "content" },
86
- picItems,
87
86
  React.createElement("div", { className: "content-text-title", style: { marginBottom: '10px' } }, data.title && React.createElement("h1", null, data.title)),
88
- React.createElement("div", { className: "content-text", dangerouslySetInnerHTML: { __html: data.content || '' } }))));
87
+ React.createElement("div", { className: "content-text", dangerouslySetInnerHTML: { __html: data.content || '' } }),
88
+ picItems)));
89
89
  case 'DYNAMIC_TYPE_WORD':
90
90
  return (React.createElement(React.Fragment, null,
91
91
  contentCss,
@@ -1,8 +1,8 @@
1
1
  import React from 'react';
2
- import { BOT_NAME, ConfigController } from 'yunzaijs';
2
+ import { ConfigController, BOT_NAME } from 'yunzaijs';
3
3
  import Config from '../../utils/config.js';
4
4
  import path from 'path';
5
- import { createRequire, _paths } from '../../utils/paths.js';
5
+ import { _paths, createRequire } from '../../utils/paths.js';
6
6
 
7
7
  // Footer.tsx
8
8
  const require = createRequire(import.meta.url);
@@ -1,8 +1,8 @@
1
1
  import React from 'react';
2
- import { BOT_NAME, ConfigController } from 'yunzaijs';
2
+ import { ConfigController, BOT_NAME } from 'yunzaijs';
3
3
  import Config from '../../utils/config.js';
4
4
  import path from 'path';
5
- import { createRequire, _paths } from '../../utils/paths.js';
5
+ import { _paths, createRequire } from '../../utils/paths.js';
6
6
 
7
7
  //help.tsx
8
8
  const require = createRequire(import.meta.url);
@@ -1,8 +1,8 @@
1
1
  import React from 'react';
2
- import { BOT_NAME, ConfigController } from 'yunzaijs';
2
+ import { ConfigController, BOT_NAME } from 'yunzaijs';
3
3
  import Config from '../../utils/config.js';
4
4
  import path from 'path';
5
- import { createRequire, _paths } from '../../utils/paths.js';
5
+ import { _paths, createRequire } from '../../utils/paths.js';
6
6
 
7
7
  const require = createRequire(import.meta.url);
8
8
  const botVersion = ConfigController.package?.version;
@@ -4,7 +4,6 @@ import BiliApi from './bilibili.main.api.js';
4
4
  import { readSyncCookie, cookieWithBiliTicket, readSavedCookieItems, readSavedCookieOtherItems } from './bilibili.main.models.js';
5
5
  import { getWbiSign } from './bilibili.risk.wbi.js';
6
6
  import { getDmImg } from './bilibili.risk.dm.img.js';
7
- import { getWebId } from './bilibili.risk.w_webid.js';
8
7
 
9
8
  class BilibiliWebDataFetcher {
10
9
  e;
@@ -52,20 +51,17 @@ class BilibiliWebDataFetcher {
52
51
  let { cookie } = await readSyncCookie();
53
52
  cookie = await cookieWithBiliTicket(cookie);
54
53
  const dmImg = await getDmImg();
55
- const w_webid = await getWebId(uid);
56
54
  const data = {
57
55
  mid: uid,
58
56
  token: '',
59
57
  platform: 'web',
60
58
  web_location: 1550101,
61
- ...dmImg,
62
- w_webid: w_webid
59
+ ...dmImg
63
60
  };
64
61
  let signCookie = (await readSavedCookieItems(cookie, ['SESSDATA'], false)) || (await readSavedCookieOtherItems(cookie, ['SESSDATA']));
65
62
  const { w_rid, time_stamp } = await getWbiSign(data, BiliApi.BILIBILI_HEADERS, signCookie);
66
63
  const params = {
67
64
  ...data,
68
- w_webid: w_webid,
69
65
  w_rid: w_rid,
70
66
  wts: time_stamp
71
67
  };