karin-plugin-kkk 1.2.1 → 1.2.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,5 +1,16 @@
1
1
  # 变更日志
2
2
 
3
+ ## [1.2.2](https://github.com/ikenxuan/karin-plugin-kkk/compare/v1.2.1...v1.2.2) (2025-04-13)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * **bilibili:** 修复转发动态过滤逻辑中的遗漏条件 ([d11f485](https://github.com/ikenxuan/karin-plugin-kkk/commit/d11f485174d16f86a0b1d1918f05597614db3bd3))
9
+ * **bilibili:** 添加空值检查以防止动态标签过滤时崩溃 ([2e3c7b1](https://github.com/ikenxuan/karin-plugin-kkk/commit/2e3c7b151eb46082611f82573146f1c4c8756978))
10
+ * ci ([e73e132](https://github.com/ikenxuan/karin-plugin-kkk/commit/e73e13294efea2a471c5ce0dc14937ddc5d862a2))
11
+ * **web.config.ts:** 优化推送配置组件布局和描述信息 ([be34225](https://github.com/ikenxuan/karin-plugin-kkk/commit/be342256032f2fad1e7122f7066dd579693a699b))
12
+ * **抖音推送:** 修复视频下载链接获取逻辑,增加备用链接 ([d090f88](https://github.com/ikenxuan/karin-plugin-kkk/commit/d090f88d432ba4e9368642fd6ce0d04838a742c5))
13
+
3
14
  ## [1.2.1](https://github.com/ikenxuan/karin-plugin-kkk/compare/v1.2.0...v1.2.1) (2025-04-09)
4
15
 
5
16
 
package/lib/apps/admin.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { createRequire } from 'module';
2
2
  import '../chunk-SLADWUI4.js';
3
- import { bilibiliLogin, douyinLogin } from '../chunk-CZCM6XX6.js';
4
- import { Config, Common, Render } from '../chunk-EQOCF3T7.js';
3
+ import { bilibiliLogin, douyinLogin } from '../chunk-EOPASE74.js';
4
+ import { Config, Common, Render } from '../chunk-NDSCNB4K.js';
5
5
  import { init_esm_shims } from '../chunk-FOF5UXCN.js';
6
6
  import fs from 'node:fs';
7
7
  import karin, { logger, Plugin } from 'node-karin';
package/lib/apps/help.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { createRequire } from 'module';
2
- import { Render, Config, Version, Common } from '../chunk-EQOCF3T7.js';
2
+ import { Render, Config, Version, Common } from '../chunk-NDSCNB4K.js';
3
3
  import { init_esm_shims } from '../chunk-FOF5UXCN.js';
4
4
  import { execSync } from 'node:child_process';
5
5
  import fs from 'node:fs';
package/lib/apps/push.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { createRequire } from 'module';
2
2
  import '../chunk-SLADWUI4.js';
3
- import { DouYinpush, Bilibilipush } from '../chunk-CZCM6XX6.js';
4
- import { Config, getDouyinData, getBilibiliData } from '../chunk-EQOCF3T7.js';
3
+ import { DouYinpush, Bilibilipush } from '../chunk-EOPASE74.js';
4
+ import { Config, getDouyinData, getBilibiliData } from '../chunk-NDSCNB4K.js';
5
5
  import { init_esm_shims } from '../chunk-FOF5UXCN.js';
6
6
  import karin from 'node-karin';
7
7
 
package/lib/apps/tools.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { createRequire } from 'module';
2
- import { getDouyinID, DouYin, getBilibiliID, Bilibili, getKuaishouID, fetchKuaishouData, Kuaishou } from '../chunk-CZCM6XX6.js';
3
- import { Config, Common } from '../chunk-EQOCF3T7.js';
2
+ import { getDouyinID, DouYin, getBilibiliID, Bilibili, getKuaishouID, fetchKuaishouData, Kuaishou } from '../chunk-EOPASE74.js';
3
+ import { Config, Common } from '../chunk-NDSCNB4K.js';
4
4
  import { init_esm_shims } from '../chunk-FOF5UXCN.js';
5
5
  import karin from 'node-karin';
6
6
 
@@ -1,5 +1,5 @@
1
1
  import { createRequire } from 'module';
2
- import { index_default, Config, Networks, Common, Base, cleanOldDynamicCache, bilibiliDB, getBilibiliData, Render, bilibiliAPI, mergeFile, Version, douyinDB, getDouyinData, wbi_sign } from './chunk-EQOCF3T7.js';
2
+ import { index_default, Config, Networks, Common, Base, cleanOldDynamicCache, bilibiliDB, getBilibiliData, Render, bilibiliAPI, mergeFile, Version, douyinDB, getDouyinData, wbi_sign } from './chunk-NDSCNB4K.js';
3
3
  import { init_esm_shims } from './chunk-FOF5UXCN.js';
4
4
  import fs4 from 'node:fs';
5
5
  import karin2, { logger, segment, common, karin, handler, render, mkdirSync } from 'node-karin';
@@ -145,7 +145,7 @@ function checklevel(obj) {
145
145
  return obj;
146
146
  }
147
147
  function checkvip(member) {
148
- return member.vip.vipStatus === 1 ? `<span style="color: ${member.vip.nickname_color || "#FB7299"}; font-weight: 700;">${member.uname}</span>` : `<span style="color: #888">${member.uname}</span>`;
148
+ return member.vip.vipStatus === 1 ? `<span style="color: ${member.vip.nickname_color ?? "#FB7299"}; font-weight: 700;">${member.uname}</span>` : `<span style="color: #888">${member.uname}</span>`;
149
149
  }
150
150
  function getRelativeTimeFromTimestamp(timestamp) {
151
151
  const now = Math.floor(Date.now() / 1e3);
@@ -862,18 +862,16 @@ UID\uFF1A${host_mid}`);
862
862
  async renderPushList() {
863
863
  await this.syncConfigToDatabase();
864
864
  const groupInfo = await this.e.bot.getGroupInfo("groupId" in this.e && this.e.groupId ? this.e.groupId : "");
865
- const groupId = "groupId" in this.e && this.e.groupId ? this.e.groupId : "";
866
- const subscriptions = await bilibiliDB.getGroupSubscriptions(groupId);
867
- if (subscriptions.length === 0) {
865
+ "groupId" in this.e && this.e.groupId ? this.e.groupId : "";
866
+ if (Config.pushlist.bilibili.length === 0) {
868
867
  await this.e.reply(`\u5F53\u524D\u7FA4\uFF1A${groupInfo.groupName}(${groupInfo.groupId})
869
868
  \u6CA1\u6709\u8BBE\u7F6E\u4EFB\u4F55B\u7AD9UP\u63A8\u9001\uFF01
870
869
  \u53EF\u4F7F\u7528\u300C#\u8BBE\u7F6EB\u7AD9\u63A8\u9001 + UP\u4E3BUID\u300D\u8FDB\u884C\u8BBE\u7F6E`);
871
870
  return;
872
871
  }
873
872
  const renderOpt = [];
874
- for (const subscription of subscriptions) {
875
- const host_mid = subscription.get("host_mid");
876
- const userInfo = await getBilibiliData("\u7528\u6237\u4E3B\u9875\u6570\u636E", Config.cookies.bilibili, { host_mid });
873
+ for (const item of Config.pushlist.bilibili) {
874
+ const userInfo = await getBilibiliData("\u7528\u6237\u4E3B\u9875\u6570\u636E", Config.cookies.bilibili, { host_mid: item.host_mid });
877
875
  renderOpt.push({
878
876
  avatar_img: userInfo.data.card.face,
879
877
  username: userInfo.data.card.name,
@@ -904,6 +902,7 @@ function extractEmojisData(data) {
904
902
  }
905
903
  var skipDynamic = (Dynamic_Data) => {
906
904
  const filterMode = Config.bilibili.push.filterMode || "blacklist";
905
+ logger.debug("\u5224\u65AD\u6807\u9898\u662F\u5426\u6709\u5C4F\u853D\u8BCD\u6216\u5C4F\u853D\u6807\u7B7E: ", `https://t.bilibili.com/${Dynamic_Data.id_str}`);
907
906
  if (filterMode === "blacklist") {
908
907
  for (const filterKeywords of Config.bilibili.push.filterKeywords) {
909
908
  if (Dynamic_Data.modules.module_dynamic.major?.archive?.title.includes(filterKeywords) || Dynamic_Data.modules.module_dynamic.desc?.text?.includes(filterKeywords)) {
@@ -911,6 +910,7 @@ var skipDynamic = (Dynamic_Data) => {
911
910
  return true;
912
911
  }
913
912
  if (Dynamic_Data.type === "DYNAMIC_TYPE_FORWARD" && "orig" in Dynamic_Data) {
913
+ if (Dynamic_Data.orig.type === "DYNAMIC_TYPE_AV" /* AV */ || !Dynamic_Data.orig.modules.module_dynamic.desc) continue;
914
914
  if (Dynamic_Data.orig.modules.module_dynamic.major?.archive?.title.includes(filterKeywords) || Dynamic_Data.orig.modules.module_dynamic.desc?.text?.includes(filterKeywords)) {
915
915
  logger.mark(`\u8F6C\u53D1\u52A8\u6001\uFF1A${`https://t.bilibili.com/${Dynamic_Data.id_str}`} \u7684\u5B50\u52A8\u6001 ${logger.green(`https://t.bilibili.com/${Dynamic_Data.orig.id_str}`)} \u5305\u542B\u9ED1\u540D\u5355\u5173\u952E\u8BCD\uFF1A\u300C${logger.red(filterKeywords)}\u300D\uFF0C\u8DF3\u8FC7\u63A8\u9001`);
916
916
  return true;
@@ -919,6 +919,7 @@ var skipDynamic = (Dynamic_Data) => {
919
919
  }
920
920
  if (Dynamic_Data.type === "DYNAMIC_TYPE_DRAW" /* DRAW */ || Dynamic_Data.type === "DYNAMIC_TYPE_FORWARD" /* FORWARD */) {
921
921
  for (const filterTags of Config.bilibili.push.filterTags) {
922
+ if (!Dynamic_Data.modules.module_dynamic?.desc?.rich_text_nodes) continue;
922
923
  for (const tag of Dynamic_Data.modules.module_dynamic.desc.rich_text_nodes) {
923
924
  if (tag.orig_text.includes(filterTags)) {
924
925
  logger.mark(`\u56FE\u6587\u52A8\u6001\uFF1A${logger.green(`https://t.bilibili.com/${Dynamic_Data.id_str}`)} \u5305\u542B\u9ED1\u540D\u5355\u6807\u7B7E\uFF1A\u300C${logger.red(filterTags)}\u300D\uFF0C\u8DF3\u8FC7\u63A8\u9001`);
@@ -926,6 +927,7 @@ var skipDynamic = (Dynamic_Data) => {
926
927
  }
927
928
  }
928
929
  if (Dynamic_Data.type === "DYNAMIC_TYPE_FORWARD" && "orig" in Dynamic_Data) {
930
+ if (Dynamic_Data.orig.type === "DYNAMIC_TYPE_AV" /* AV */ || !Dynamic_Data.orig.modules.module_dynamic.desc) continue;
929
931
  for (const tag of Dynamic_Data.orig.modules.module_dynamic.desc.rich_text_nodes) {
930
932
  if (tag.orig_text.includes(filterTags)) {
931
933
  logger.mark(`\u8F6C\u53D1\u52A8\u6001\uFF1A${`https://t.bilibili.com/${Dynamic_Data.id_str}`} \u7684\u5B50\u52A8\u6001 ${logger.green(`https://t.bilibili.com/${Dynamic_Data.orig.id_str}`)} \u5305\u542B\u9ED1\u540D\u5355\u6807\u7B7E\uFF1A\u300C${logger.red(filterTags)}\u300D\uFF0C\u8DF3\u8FC7\u63A8\u9001`);
@@ -949,6 +951,7 @@ var skipDynamic = (Dynamic_Data) => {
949
951
  return false;
950
952
  }
951
953
  if (Dynamic_Data.type === "DYNAMIC_TYPE_FORWARD" && "orig" in Dynamic_Data) {
954
+ if (Dynamic_Data.orig.type === "DYNAMIC_TYPE_AV" /* AV */ || !Dynamic_Data.orig.modules.module_dynamic.desc) continue;
952
955
  if (Dynamic_Data.orig.modules.module_dynamic.major?.archive?.title?.includes(whiteKeyword) || Dynamic_Data.orig.modules.module_dynamic.desc?.text?.includes(whiteKeyword)) {
953
956
  logger.mark(`\u8F6C\u53D1\u52A8\u6001\uFF1A${`https://t.bilibili.com/${Dynamic_Data.id_str}`} \u7684\u5B50\u52A8\u6001 ${logger.green(`https://t.bilibili.com/${Dynamic_Data.orig.id_str}`)} \u5305\u542B\u767D\u540D\u5355\u5173\u952E\u8BCD\uFF1A\u300C${logger.green(whiteKeyword)}\u300D\uFF0C\u5141\u8BB8\u63A8\u9001`);
954
957
  return false;
@@ -958,6 +961,7 @@ var skipDynamic = (Dynamic_Data) => {
958
961
  }
959
962
  if (hasTagWhitelist && (Dynamic_Data.type === "DYNAMIC_TYPE_DRAW" /* DRAW */ || Dynamic_Data.type === "DYNAMIC_TYPE_FORWARD" /* FORWARD */)) {
960
963
  for (const whiteTag of Config.bilibili.push.whitelistTags) {
964
+ if (!Dynamic_Data.modules.module_dynamic?.desc?.rich_text_nodes) continue;
961
965
  for (const tag of Dynamic_Data.modules.module_dynamic.desc.rich_text_nodes) {
962
966
  if (tag.orig_text.includes(whiteTag)) {
963
967
  logger.mark(`\u56FE\u6587\u52A8\u6001\uFF1A${logger.green(`https://t.bilibili.com/${Dynamic_Data.id_str}`)} \u5305\u542B\u767D\u540D\u5355\u6807\u7B7E\uFF1A\u300C${logger.green(whiteTag)}\u300D\uFF0C\u5141\u8BB8\u63A8\u9001`);
@@ -965,6 +969,7 @@ var skipDynamic = (Dynamic_Data) => {
965
969
  }
966
970
  }
967
971
  if (Dynamic_Data.type === "DYNAMIC_TYPE_FORWARD" && "orig" in Dynamic_Data) {
972
+ if (Dynamic_Data.orig.type === "DYNAMIC_TYPE_AV" /* AV */ || !Dynamic_Data.orig.modules.module_dynamic.desc) continue;
968
973
  for (const tag of Dynamic_Data.orig.modules.module_dynamic.desc.rich_text_nodes) {
969
974
  if (tag.orig_text.includes(whiteTag)) {
970
975
  logger.mark(`\u8F6C\u53D1\u52A8\u6001\uFF1A${`https://t.bilibili.com/${Dynamic_Data.id_str}`} \u7684\u5B50\u52A8\u6001 ${logger.green(`https://t.bilibili.com/${Dynamic_Data.orig.id_str}`)} \u5305\u542B\u767D\u540D\u5355\u6807\u7B7E\uFF1A\u300C${logger.green(whiteTag)}\u300D\uFF0C\u5141\u8BB8\u63A8\u9001`);
@@ -1062,7 +1067,7 @@ var Bilibili = class extends Base {
1062
1067
  img = await Render("bilibili/comment", {
1063
1068
  Type: "\u89C6\u9891",
1064
1069
  CommentsData: commentsdata,
1065
- CommentLength: String(commentsdata?.length ? commentsdata.length : 0),
1070
+ CommentLength: String(commentsdata?.length ?? 0),
1066
1071
  share_url: "https://b23.tv/" + infoData.data.bvid,
1067
1072
  Clarity: Config.bilibili.videopriority === true ? nockData.data.accept_description[0] : correctList.accept_description[0],
1068
1073
  VideoSize: Config.bilibili.videopriority === true ? (nockData.data.durl[0].size / (1024 * 1024)).toFixed(2) : videoSize,
@@ -1187,9 +1192,9 @@ ${this.downloadfilename}
1187
1192
  img = await Render("bilibili/comment", {
1188
1193
  Type: "\u52A8\u6001",
1189
1194
  CommentsData: commentsdata,
1190
- CommentLength: String(commentsdata?.length ? commentsdata.length : 0),
1195
+ CommentLength: String(commentsdata?.length ?? 0),
1191
1196
  share_url: "https://t.bilibili.com/" + dynamicInfo.data.item.id_str,
1192
- ImageLength: dynamicInfo.data.item.modules?.module_dynamic?.major?.draw?.items?.length || "\u52A8\u6001\u4E2D\u6CA1\u6709\u9644\u5E26\u56FE\u7247",
1197
+ ImageLength: dynamicInfo.data.item.modules?.module_dynamic?.major?.draw?.items?.length ?? "\u52A8\u6001\u4E2D\u6CA1\u6709\u9644\u5E26\u56FE\u7247",
1193
1198
  shareurl: "\u52A8\u6001\u5206\u4EAB\u94FE\u63A5"
1194
1199
  });
1195
1200
  if (imgArray.length === 1) await this.e.reply(imgArray[0]);
@@ -1259,7 +1264,7 @@ ${this.downloadfilename}
1259
1264
  CommentsData: bilibiliComments(commentsData),
1260
1265
  CommentLength: String(bilibiliComments(commentsData)?.length ? bilibiliComments(commentsData).length : 0),
1261
1266
  share_url: "https://t.bilibili.com/" + dynamicInfo.data.item.id_str,
1262
- ImageLength: dynamicInfo.data.item.modules?.module_dynamic?.major?.draw?.items?.length || "\u52A8\u6001\u4E2D\u6CA1\u6709\u9644\u5E26\u56FE\u7247",
1267
+ ImageLength: dynamicInfo.data.item.modules?.module_dynamic?.major?.draw?.items?.length ?? "\u52A8\u6001\u4E2D\u6CA1\u6709\u9644\u5E26\u56FE\u7247",
1263
1268
  shareurl: "\u52A8\u6001\u5206\u4EAB\u94FE\u63A5"
1264
1269
  })
1265
1270
  );
@@ -1368,7 +1373,7 @@ ${this.downloadfilename}
1368
1373
  CommentsData: bilibiliComments(commentsData),
1369
1374
  CommentLength: String(bilibiliComments(commentsData)?.length ? bilibiliComments(commentsData).length : 0),
1370
1375
  share_url: "https://www.bilibili.com/video/" + bvid,
1371
- ImageLength: dynamicInfo.data.item.modules?.module_dynamic?.major?.draw?.items?.length || "\u52A8\u6001\u4E2D\u6CA1\u6709\u9644\u5E26\u56FE\u7247",
1376
+ ImageLength: dynamicInfo.data.item.modules?.module_dynamic?.major?.draw?.items?.length ?? "\u52A8\u6001\u4E2D\u6CA1\u6709\u9644\u5E26\u56FE\u7247",
1372
1377
  shareurl: "\u52A8\u6001\u5206\u4EAB\u94FE\u63A5"
1373
1378
  })
1374
1379
  );
@@ -1550,7 +1555,7 @@ ${this.downloadfilename}
1550
1555
  }
1551
1556
  };
1552
1557
  function checkvip3(member) {
1553
- return member.vip.vipStatus || member.vip.status === 1 ? `<span style="color: ${member.vip.nickname_color || "#FB7299"}; font-weight: 700;">${member.name}</span>` : `<span style="color: ${Common.useDarkTheme() ? "#e9e9e9" : "#313131"}; font-weight: 700;">${member.name}</span>`;
1558
+ return member.vip.vipStatus || member.vip.status === 1 ? `<span style="color: ${member.vip.nickname_color ?? "#FB7299"}; font-weight: 700;">${member.name}</span>` : `<span style="color: ${Common.useDarkTheme() ? "#e9e9e9" : "#313131"}; font-weight: 700;">${member.name}</span>`;
1554
1559
  }
1555
1560
  function br3(data) {
1556
1561
  return data = data.replace(/\n/g, "<br>");
@@ -1664,9 +1669,9 @@ async function douyinComments(data, emojidata) {
1664
1669
  const nickname = data.comments[i].user.nickname;
1665
1670
  const userimageurl = data.comments[i].user.avatar_thumb.url_list[0];
1666
1671
  const text = data.comments[i].text;
1667
- const ip = data.comments[i].ip_label ? data.comments[i].ip_label : "\u672A\u77E5";
1672
+ const ip = data.comments[i].ip_label ?? "\u672A\u77E5";
1668
1673
  const time = data.comments[i].create_time;
1669
- const label_type = data.comments[i].label_type ? data.comments[i].label_type : -1;
1674
+ const label_type = data.comments[i].label_type ?? -1;
1670
1675
  const sticker = data.comments[i].sticker ? data.comments[i].sticker.animate_url.url_list[0] : null;
1671
1676
  const digg_count = data.comments[i].digg_count;
1672
1677
  const imageurl = data.comments[i].image_list && data.comments[i].image_list[0] && data.comments[i].image_list[0].origin_url && data.comments[i].image_list[0].origin_url.url_list ? data.comments[i].image_list[0].origin_url.url_list[0] : null;
@@ -2165,7 +2170,7 @@ var DouYinpush = class extends Base {
2165
2170
  }).getLongLink();
2166
2171
  } else {
2167
2172
  downloadUrl = await new Networks({
2168
- url: Detail_Data.video.play_addr_h264.url_list[2] ?? Detail_Data.video.play_addr_h264.url_list[2],
2173
+ url: Detail_Data.video.bit_rate[0].play_addr.url_list[2] ?? Detail_Data.video.play_addr_h264.url_list[2] ?? Detail_Data.video.play_addr_h264.url_list[2],
2169
2174
  headers: this.headers
2170
2175
  }).getLongLink();
2171
2176
  }
@@ -2395,18 +2400,15 @@ sec_uid${UserInfoData.user.sec_uid}`);
2395
2400
  async renderPushList() {
2396
2401
  await this.syncConfigToDatabase();
2397
2402
  const groupInfo = await this.e.bot.getGroupInfo("groupId" in this.e && this.e.groupId ? this.e.groupId : "");
2398
- const groupId = "groupId" in this.e && this.e.groupId ? this.e.groupId : "";
2399
- const subscriptions = await douyinDB.getGroupSubscriptions(groupId);
2400
- if (subscriptions.length === 0) {
2403
+ if (Config.pushlist.douyin.length === 0) {
2401
2404
  await this.e.reply(`\u5F53\u524D\u7FA4\uFF1A${groupInfo.groupName}(${groupInfo.groupId})
2402
2405
  \u6CA1\u6709\u8BBE\u7F6E\u4EFB\u4F55\u6296\u97F3\u535A\u4E3B\u63A8\u9001\uFF01
2403
2406
  \u53EF\u4F7F\u7528\u300C#\u8BBE\u7F6E\u6296\u97F3\u63A8\u9001 + \u6296\u97F3\u53F7\u300D\u8FDB\u884C\u8BBE\u7F6E`);
2404
2407
  return;
2405
2408
  }
2406
2409
  const renderOpt = [];
2407
- for (const subscription of subscriptions) {
2408
- const sec_uid = subscription.get("sec_uid");
2409
- const userInfo = await getDouyinData("\u7528\u6237\u4E3B\u9875\u6570\u636E", Config.cookies.douyin, { sec_uid });
2410
+ for (const item of Config.pushlist.douyin) {
2411
+ const userInfo = await getDouyinData("\u7528\u6237\u4E3B\u9875\u6570\u636E", Config.cookies.douyin, { sec_uid: item.sec_uid });
2410
2412
  renderOpt.push({
2411
2413
  avatar_img: userInfo.user.avatar_larger.url_list[0],
2412
2414
  username: userInfo.user.nickname,
@@ -2705,7 +2707,7 @@ var DouYin = class extends Base {
2705
2707
  }).getLongLink();
2706
2708
  } else {
2707
2709
  g_video_url = await new Networks({
2708
- url: video.play_addr_h264.url_list[2] || video.play_addr_h264.url_list[2],
2710
+ url: video.play_addr_h264.url_list[2] ?? video.play_addr_h264.url_list[2],
2709
2711
  headers: this.headers
2710
2712
  }).getLongLink();
2711
2713
  }
@@ -2737,7 +2739,7 @@ ${g_video_url}`));
2737
2739
  {
2738
2740
  Type: this.is_mp4 ? "\u89C6\u9891" : this.is_slides ? "\u5408\u8F91" : "\u56FE\u96C6",
2739
2741
  CommentsData: commentsArray,
2740
- CommentLength: String(commentsArray.jsonArray?.length ? commentsArray.jsonArray.length : 0),
2742
+ CommentLength: String(commentsArray.jsonArray?.length ?? 0),
2741
2743
  share_url: this.is_mp4 ? `https://aweme.snssdk.com/aweme/v1/play/?video_id=${VideoData.aweme_detail.video.play_addr.uri}&ratio=1080p&line=0` : VideoData.aweme_detail.share_url,
2742
2744
  Title: g_title,
2743
2745
  VideoSize: mp4size,
@@ -3080,7 +3082,7 @@ var Kuaishou = class extends Base {
3080
3082
  Type: "\u89C6\u9891",
3081
3083
  viewCount: data.VideoData.data.visionVideoDetail.photo.viewCount,
3082
3084
  CommentsData,
3083
- CommentLength: String(CommentsData?.length ? CommentsData.length : 0),
3085
+ CommentLength: String(CommentsData?.length ?? 0),
3084
3086
  share_url: video_url,
3085
3087
  VideoSize: fileSizeInMB,
3086
3088
  likeCount: data.VideoData.data.visionVideoDetail.photo.likeCount