koishi-plugin-video-parser-all 0.4.5 → 0.4.7

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