koishi-plugin-video-parser-all 0.4.8 → 0.5.0

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 (3) hide show
  1. package/lib/index.d.ts +12 -88
  2. package/lib/index.js +305 -794
  3. package/package.json +1 -1
package/lib/index.d.ts CHANGED
@@ -1,40 +1,22 @@
1
- import { Schema } from 'koishi';
1
+ import { Context, Schema } from 'koishi';
2
2
  export declare const name = "video-parser-all";
3
3
  export declare const Config: Schema<{
4
4
  enable?: boolean | null | undefined;
5
- autoParse?: boolean | null | undefined;
6
- enableBvAvParse?: boolean | null | undefined;
7
5
  botName?: string | null | undefined;
8
6
  showWaitingTip?: boolean | null | undefined;
9
7
  waitingTipText?: string | null | undefined;
10
8
  sameLinkInterval?: number | null | undefined;
11
- maxVideoSize?: number | null | undefined;
12
- downloadThreads?: number | null | undefined;
13
- enableApiSelection?: boolean | null | undefined;
14
9
  } & import("cosmokit").Dict & {
15
- platformEnable?: ({
16
- bilibili?: boolean | null | undefined;
17
- douyin?: boolean | null | undefined;
18
- kuaishou?: boolean | null | undefined;
19
- xiaohongshu?: boolean | null | undefined;
20
- weibo?: boolean | null | undefined;
21
- toutiao?: boolean | null | undefined;
22
- pipigx?: boolean | null | undefined;
23
- pipixia?: boolean | null | undefined;
24
- zuiyou?: boolean | null | undefined;
25
- } & import("cosmokit").Dict) | null | undefined;
26
- } & {
27
- messageFormat?: string | null | undefined;
10
+ unifiedMessageFormat?: string | null | undefined;
28
11
  } & {
29
12
  showImageText?: boolean | null | undefined;
30
13
  showVideoFile?: boolean | null | undefined;
31
14
  } & {
32
15
  maxDescLength?: number | null | undefined;
33
- } & ({
16
+ } & {
34
17
  timeout?: number | null | undefined;
35
18
  videoSendTimeout?: number | null | undefined;
36
19
  userAgent?: string | null | undefined;
37
- bilibiliAccessKey?: string | null | undefined;
38
20
  } & {
39
21
  ignoreSendError?: boolean | null | undefined;
40
22
  retryTimes?: number | null | undefined;
@@ -42,60 +24,27 @@ export declare const Config: Schema<{
42
24
  } & {
43
25
  enableForward?: boolean | null | undefined;
44
26
  downloadVideoBeforeSend?: boolean | null | undefined;
45
- } & ({
27
+ } & {
46
28
  messageBufferDelay?: number | null | undefined;
47
- } & ({
29
+ } & {
48
30
  autoClearCacheInterval?: number | null | undefined;
49
- } & (({
50
- enableApiSelection?: false | null | undefined;
51
- } & import("cosmokit").Dict) | ({
52
- enableApiSelection?: true | null | undefined;
53
- preferredApi?: ({
54
- bilibili?: "https://api.bugpk.com/api/short_videos" | "https://api.xingzhige.com/API/b_parse/" | "https://api.bugpk.com/api/bilibili" | "https://api.bilibili.com/x/web-interface/view" | null | undefined;
55
- douyin?: "https://api.bugpk.com/api/short_videos" | "https://api.xingzhige.com/API/douyin/" | "https://api.bugpk.com/api/douyin" | "https://api.bugpk.com/api/dyjx" | "https://api.bugpk.com/api/dylive" | null | undefined;
56
- kuaishou?: "https://api.bugpk.com/api/short_videos" | "https://api.bugpk.com/api/ksjx" | "https://api.bugpk.com/api/kuaishou" | "https://api.bugpk.com/api/ksimg" | "https://api.suyanw.cn/api/kuaishou.php" | null | undefined;
57
- xiaohongshu?: "https://api.bugpk.com/api/short_videos" | "https://api.bugpk.com/api/xhsjx" | "https://api.bugpk.com/api/xhsimg" | "https://api.bugpk.com/api/xhslive" | "https://api.bugpk.com/api/xhs" | null | undefined;
58
- weibo?: "https://api.bugpk.com/api/short_videos" | "https://api.bugpk.com/api/weibo" | "https://api.bugpk.com/api/weibo_v" | null | undefined;
59
- toutiao?: "https://api.bugpk.com/api/short_videos" | "https://api.bugpk.com/api/toutiao" | null | undefined;
60
- pipigx?: "https://api.bugpk.com/api/short_videos" | "https://api.bugpk.com/api/pipigx" | "https://api.suyanw.cn/api/pipigx.php" | null | undefined;
61
- pipixia?: "https://api.bugpk.com/api/short_videos" | "https://api.bugpk.com/api/pipixia" | null | undefined;
62
- zuiyou?: "https://api.bugpk.com/api/short_videos" | "https://api.bugpk.com/api/zuiyou" | "https://api.suyanw.cn/api/zuiyou.php" | null | undefined;
63
- } & import("cosmokit").Dict) | null | undefined;
64
- } & import("cosmokit").Dict))))), {
31
+ }, {
65
32
  enable: boolean;
66
- autoParse: boolean;
67
- enableBvAvParse: boolean;
68
33
  botName: string;
69
34
  showWaitingTip: boolean;
70
35
  waitingTipText: string;
71
36
  sameLinkInterval: number;
72
- maxVideoSize: number;
73
- downloadThreads: number;
74
- enableApiSelection: boolean;
75
37
  } & import("cosmokit").Dict & {
76
- platformEnable: Schemastery.ObjectT<{
77
- bilibili: Schema<boolean, boolean>;
78
- douyin: Schema<boolean, boolean>;
79
- kuaishou: Schema<boolean, boolean>;
80
- xiaohongshu: Schema<boolean, boolean>;
81
- weibo: Schema<boolean, boolean>;
82
- toutiao: Schema<boolean, boolean>;
83
- pipigx: Schema<boolean, boolean>;
84
- pipixia: Schema<boolean, boolean>;
85
- zuiyou: Schema<boolean, boolean>;
86
- }>;
87
- } & {
88
- messageFormat: string;
38
+ unifiedMessageFormat: string;
89
39
  } & {
90
40
  showImageText: boolean;
91
41
  showVideoFile: boolean;
92
42
  } & {
93
43
  maxDescLength: number;
94
- } & ({
44
+ } & {
95
45
  timeout: number;
96
46
  videoSendTimeout: number;
97
47
  userAgent: string;
98
- bilibiliAccessKey: string;
99
48
  } & {
100
49
  ignoreSendError: boolean;
101
50
  retryTimes: number;
@@ -103,34 +52,9 @@ export declare const Config: Schema<{
103
52
  } & {
104
53
  enableForward: boolean;
105
54
  downloadVideoBeforeSend: boolean;
106
- } & ({
55
+ } & {
107
56
  messageBufferDelay: number;
108
- } & ({
57
+ } & {
109
58
  autoClearCacheInterval: number;
110
- } & (Schemastery.ObjectT<{
111
- enableApiSelection: Schema<false, false>;
112
- }> | Schemastery.ObjectT<{
113
- enableApiSelection: Schema<true, true>;
114
- preferredApi: Schema<Schemastery.ObjectS<{
115
- bilibili: Schema<"https://api.bugpk.com/api/short_videos" | "https://api.xingzhige.com/API/b_parse/" | "https://api.bugpk.com/api/bilibili" | "https://api.bilibili.com/x/web-interface/view", "https://api.bugpk.com/api/short_videos" | "https://api.xingzhige.com/API/b_parse/" | "https://api.bugpk.com/api/bilibili" | "https://api.bilibili.com/x/web-interface/view">;
116
- douyin: Schema<"https://api.bugpk.com/api/short_videos" | "https://api.xingzhige.com/API/douyin/" | "https://api.bugpk.com/api/douyin" | "https://api.bugpk.com/api/dyjx" | "https://api.bugpk.com/api/dylive", "https://api.bugpk.com/api/short_videos" | "https://api.xingzhige.com/API/douyin/" | "https://api.bugpk.com/api/douyin" | "https://api.bugpk.com/api/dyjx" | "https://api.bugpk.com/api/dylive">;
117
- kuaishou: Schema<"https://api.bugpk.com/api/short_videos" | "https://api.bugpk.com/api/ksjx" | "https://api.bugpk.com/api/kuaishou" | "https://api.bugpk.com/api/ksimg" | "https://api.suyanw.cn/api/kuaishou.php", "https://api.bugpk.com/api/short_videos" | "https://api.bugpk.com/api/ksjx" | "https://api.bugpk.com/api/kuaishou" | "https://api.bugpk.com/api/ksimg" | "https://api.suyanw.cn/api/kuaishou.php">;
118
- xiaohongshu: Schema<"https://api.bugpk.com/api/short_videos" | "https://api.bugpk.com/api/xhsjx" | "https://api.bugpk.com/api/xhsimg" | "https://api.bugpk.com/api/xhslive" | "https://api.bugpk.com/api/xhs", "https://api.bugpk.com/api/short_videos" | "https://api.bugpk.com/api/xhsjx" | "https://api.bugpk.com/api/xhsimg" | "https://api.bugpk.com/api/xhslive" | "https://api.bugpk.com/api/xhs">;
119
- weibo: Schema<"https://api.bugpk.com/api/short_videos" | "https://api.bugpk.com/api/weibo" | "https://api.bugpk.com/api/weibo_v", "https://api.bugpk.com/api/short_videos" | "https://api.bugpk.com/api/weibo" | "https://api.bugpk.com/api/weibo_v">;
120
- toutiao: Schema<"https://api.bugpk.com/api/short_videos" | "https://api.bugpk.com/api/toutiao", "https://api.bugpk.com/api/short_videos" | "https://api.bugpk.com/api/toutiao">;
121
- pipigx: Schema<"https://api.bugpk.com/api/short_videos" | "https://api.bugpk.com/api/pipigx" | "https://api.suyanw.cn/api/pipigx.php", "https://api.bugpk.com/api/short_videos" | "https://api.bugpk.com/api/pipigx" | "https://api.suyanw.cn/api/pipigx.php">;
122
- pipixia: Schema<"https://api.bugpk.com/api/short_videos" | "https://api.bugpk.com/api/pipixia", "https://api.bugpk.com/api/short_videos" | "https://api.bugpk.com/api/pipixia">;
123
- zuiyou: Schema<"https://api.bugpk.com/api/short_videos" | "https://api.bugpk.com/api/zuiyou" | "https://api.suyanw.cn/api/zuiyou.php", "https://api.bugpk.com/api/short_videos" | "https://api.bugpk.com/api/zuiyou" | "https://api.suyanw.cn/api/zuiyou.php">;
124
- }>, Schemastery.ObjectT<{
125
- bilibili: Schema<"https://api.bugpk.com/api/short_videos" | "https://api.xingzhige.com/API/b_parse/" | "https://api.bugpk.com/api/bilibili" | "https://api.bilibili.com/x/web-interface/view", "https://api.bugpk.com/api/short_videos" | "https://api.xingzhige.com/API/b_parse/" | "https://api.bugpk.com/api/bilibili" | "https://api.bilibili.com/x/web-interface/view">;
126
- douyin: Schema<"https://api.bugpk.com/api/short_videos" | "https://api.xingzhige.com/API/douyin/" | "https://api.bugpk.com/api/douyin" | "https://api.bugpk.com/api/dyjx" | "https://api.bugpk.com/api/dylive", "https://api.bugpk.com/api/short_videos" | "https://api.xingzhige.com/API/douyin/" | "https://api.bugpk.com/api/douyin" | "https://api.bugpk.com/api/dyjx" | "https://api.bugpk.com/api/dylive">;
127
- kuaishou: Schema<"https://api.bugpk.com/api/short_videos" | "https://api.bugpk.com/api/ksjx" | "https://api.bugpk.com/api/kuaishou" | "https://api.bugpk.com/api/ksimg" | "https://api.suyanw.cn/api/kuaishou.php", "https://api.bugpk.com/api/short_videos" | "https://api.bugpk.com/api/ksjx" | "https://api.bugpk.com/api/kuaishou" | "https://api.bugpk.com/api/ksimg" | "https://api.suyanw.cn/api/kuaishou.php">;
128
- xiaohongshu: Schema<"https://api.bugpk.com/api/short_videos" | "https://api.bugpk.com/api/xhsjx" | "https://api.bugpk.com/api/xhsimg" | "https://api.bugpk.com/api/xhslive" | "https://api.bugpk.com/api/xhs", "https://api.bugpk.com/api/short_videos" | "https://api.bugpk.com/api/xhsjx" | "https://api.bugpk.com/api/xhsimg" | "https://api.bugpk.com/api/xhslive" | "https://api.bugpk.com/api/xhs">;
129
- weibo: Schema<"https://api.bugpk.com/api/short_videos" | "https://api.bugpk.com/api/weibo" | "https://api.bugpk.com/api/weibo_v", "https://api.bugpk.com/api/short_videos" | "https://api.bugpk.com/api/weibo" | "https://api.bugpk.com/api/weibo_v">;
130
- toutiao: Schema<"https://api.bugpk.com/api/short_videos" | "https://api.bugpk.com/api/toutiao", "https://api.bugpk.com/api/short_videos" | "https://api.bugpk.com/api/toutiao">;
131
- pipigx: Schema<"https://api.bugpk.com/api/short_videos" | "https://api.bugpk.com/api/pipigx" | "https://api.suyanw.cn/api/pipigx.php", "https://api.bugpk.com/api/short_videos" | "https://api.bugpk.com/api/pipigx" | "https://api.suyanw.cn/api/pipigx.php">;
132
- pipixia: Schema<"https://api.bugpk.com/api/short_videos" | "https://api.bugpk.com/api/pipixia", "https://api.bugpk.com/api/short_videos" | "https://api.bugpk.com/api/pipixia">;
133
- zuiyou: Schema<"https://api.bugpk.com/api/short_videos" | "https://api.bugpk.com/api/zuiyou" | "https://api.suyanw.cn/api/zuiyou.php", "https://api.bugpk.com/api/short_videos" | "https://api.bugpk.com/api/zuiyou" | "https://api.suyanw.cn/api/zuiyou.php">;
134
- }>>;
135
- }>))))>;
136
- export declare function apply(ctx: any, config: any): void;
59
+ }>;
60
+ export declare function apply(ctx: Context, config: any): void;