yz-yuki-plugin 2.0.8-1 → 2.0.8-2

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,5 @@
1
1
  # 2.0.8
2
+ * 更新B站动态标题获取
2
3
  * 合并分支dev与dev3,减少维护成本
3
4
 
4
5
  # 2.0.7
@@ -42,15 +42,16 @@ class BiliQuery {
42
42
  return { url: item?.url, width: item?.width, height: item?.height };
43
43
  }) || [];
44
44
  additional = data?.modules?.module_dynamic?.additional;
45
+ formatData.data.title = desc?.title || '';
45
46
  formatData.data.content = this.parseRichTextNodes(desc?.summary?.rich_text_nodes || desc?.summary?.text, additional) || '';
46
47
  }
47
48
  else {
48
49
  desc = data?.modules?.module_dynamic?.desc || {};
49
50
  pics = data?.modules?.module_dynamic?.major?.draw?.items;
50
51
  pics = [];
52
+ formatData.data.title = desc?.title || '';
51
53
  formatData.data.content = this.parseRichTextNodes(desc?.text);
52
54
  }
53
- formatData.data.title = '';
54
55
  formatData.data.url = `${BiliDrawDynamicLinkUrl}${data.id_str}`;
55
56
  formatData.data.pubTime = author.pub_time;
56
57
  formatData.data.pubTs = moment(author.pub_ts * 1000).format('YYYY年MM月DD日 HH:mm:ss');
@@ -65,6 +66,7 @@ class BiliQuery {
65
66
  return { url: item?.url, width: item?.width, height: item?.height };
66
67
  });
67
68
  additional = data?.modules?.module_dynamic?.additional;
69
+ formatData.data.title = desc?.title || '';
68
70
  formatData.data.content = this.parseRichTextNodes(desc?.summary?.rich_text_nodes || desc?.summary?.text, additional) || '';
69
71
  }
70
72
  else if (majorType === 'MAJOR_TYPE_DRAW') {
@@ -73,6 +75,7 @@ class BiliQuery {
73
75
  pics = pics.map((item) => {
74
76
  return { url: item?.url, width: item?.width, height: item?.height };
75
77
  });
78
+ formatData.data.title = desc?.title || '';
76
79
  formatData.data.content = this.parseRichTextNodes(desc?.rich_text_nodes || desc?.text) || '';
77
80
  }
78
81
  else {
@@ -81,9 +84,9 @@ class BiliQuery {
81
84
  pics = pics.map((item) => {
82
85
  return { url: item?.src };
83
86
  });
87
+ formatData.data.title = desc?.title || '';
84
88
  formatData.data.content = this.parseRichTextNodes(desc?.text);
85
89
  }
86
- formatData.data.title = '';
87
90
  formatData.data.url = `${BiliDrawDynamicLinkUrl}${data.id_str}`;
88
91
  formatData.data.pubTime = author.pub_time;
89
92
  formatData.data.pubTs = moment(author.pub_ts * 1000).format('YYYY年MM月DD日 HH:mm:ss');
@@ -453,6 +456,7 @@ class BiliQuery {
453
456
  msg_meta = `B站【${upName}】图文动态推送:`;
454
457
  msg = [
455
458
  msg_meta,
459
+ ...(desc?.title ? [`\n--------------------`, `\n${desc.title}`] : []),
456
460
  `\n--------------------`,
457
461
  `\n正文:`,
458
462
  `\n${this.dynamicContentLimit(content, setData)}`,
@@ -508,6 +512,7 @@ class BiliQuery {
508
512
  msg_meta = `B站【${upName}】图文动态推送:`;
509
513
  msg = [
510
514
  msg_meta,
515
+ ...(desc?.title ? [`\n--------------------`, `\n${desc.title}`] : []),
511
516
  `\n--------------------`,
512
517
  `\n正文:`,
513
518
  `\n${this.dynamicContentLimit(content, setData)}`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yz-yuki-plugin",
3
- "version": "2.0.8-1",
3
+ "version": "2.0.8-2",
4
4
  "description": "优纪插件,yunzaijs 关于 微博推送、B站推送 等功能的拓展插件",
5
5
  "author": "snowtafir",
6
6
  "type": "module",