koishi-plugin-bilitester 1.6.5 → 1.7.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.
Files changed (2) hide show
  1. package/lib/index.js +6 -0
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -440,6 +440,9 @@ function apply(ctx, config) {
440
440
  const video = videoInfo.data;
441
441
  const duration = formatDuration(video.duration);
442
442
  const pubdate = new Date(video.pubdate * 1000).toLocaleString('zh-CN');
443
+ if (!video.owner) {
444
+ return '获取视频信息失败,请稍后重试';
445
+ }
443
446
  return `视频信息:\n` +
444
447
  `标题: ${video.title}\n` +
445
448
  `BV号: ${video.bvid}\n` +
@@ -504,6 +507,9 @@ function apply(ctx, config) {
504
507
  const video = videoInfo.data;
505
508
  const duration = formatDuration(video.duration);
506
509
  const pubdate = new Date(video.pubdate * 1000).toLocaleString('zh-CN');
510
+ if (!video.owner) {
511
+ return '获取视频信息失败,请稍后重试';
512
+ }
507
513
  return `视频信息:\n` +
508
514
  `标题: ${video.title}\n` +
509
515
  `BV号: ${video.bvid}\n` +
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "koishi-plugin-bilitester",
3
- "version": "1.6.5",
3
+ "version": "1.7.1",
4
4
  "description": "哔哩哔哩登录和API调用插件,支持二维码登录和Cookie管理",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",