karin-plugin-kkk 1.6.12 → 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.
- package/CHANGELOG.md +32 -0
- package/lib/apps/admin.js +5 -7
- package/lib/apps/help.js +3 -4
- package/lib/apps/push.js +9 -10
- package/lib/apps/tools.js +7 -8
- package/lib/chunk/db-BnxnGlE9.js +1450 -0
- package/lib/chunk/{main-ACpbO-o9.js → main-SmMgu7lY.js} +319 -494
- package/lib/chunk/{vendor-BXFp06D9.js → vendor-CrTmFBXK.js} +39177 -36241
- package/lib/index.js +7 -8
- package/lib/web.config.js +1 -1
- package/package.json +4 -4
- package/LICENSE +0 -674
- package/config/default_config/app.yaml +0 -39
- package/config/default_config/bilibili.yaml +0 -74
- package/config/default_config/cookies.yaml +0 -8
- package/config/default_config/douyin.yaml +0 -35
- package/config/default_config/kuaishou.yaml +0 -11
- package/config/default_config/pushlist.yaml +0 -29
- package/config/default_config/upload.yaml +0 -23
- package/lib/chunk/db-D3WhtbU7.js +0 -1258
- package/resources/font/bilifont/bilifont.1.woff2 +0 -0
- package/resources/font/bilifont/bilifont.2.woff2 +0 -0
- package/resources/font/bilifont/font.css +0 -17
- package/resources/font/font.css +0 -3458
- package/resources/image/admin/default.jpg +0 -0
- package/resources/image/bilibili/bilibili-dark.png +0 -0
- package/resources/image/bilibili/bilibili-light.png +0 -0
- package/resources/image/bilibili/bilibili.png +0 -0
- package/resources/image/bilibili/id-dark.svg +0 -1
- package/resources/image/bilibili/id-light.svg +0 -1
- package/resources/image/bilibili/like-dark.svg +0 -6
- package/resources/image/bilibili/like-light.svg +0 -6
- package/resources/image/bilibili//347/233/264/346/222/255/344/270/255.png +0 -0
- package/resources/image/douyin/douyin.png +0 -0
- package/resources/image/douyin/dylogo-dark.svg +0 -23
- package/resources/image/douyin/dylogo-light.svg +0 -38
- package/resources/image/douyin/search-dark.svg +0 -1
- package/resources/image/douyin/search-light.svg +0 -3
- package/resources/image/douyin//346/212/226/351/237/263-/347/233/264/346/222/255/344/270/255.png +0 -0
- package/resources/image/kuaishou/logo.png +0 -0
- package/resources/template/admin/css/index.css +0 -134
- package/resources/template/admin/html/index.html +0 -425
- package/resources/template/apiError/css/index.css +0 -290
- package/resources/template/apiError/html/index.html +0 -30
- package/resources/template/bilibili/css/bangumi.css +0 -863
- package/resources/template/bilibili/css/comment.css +0 -446
- package/resources/template/bilibili/css/dynamic/DYNAMIC_TYPE_DRAW.css +0 -333
- package/resources/template/bilibili/css/dynamic/DYNAMIC_TYPE_FORWARD.css +0 -635
- package/resources/template/bilibili/css/dynamic/DYNAMIC_TYPE_LIVE_RCMD.css +0 -382
- package/resources/template/bilibili/css/dynamic/base.css +0 -327
- package/resources/template/bilibili/css/userlist.css +0 -77
- package/resources/template/bilibili/html/bangumi.html +0 -54
- package/resources/template/bilibili/html/comment.html +0 -90
- package/resources/template/bilibili/html/dynamic/DYNAMIC_TYPE_AV.html +0 -65
- package/resources/template/bilibili/html/dynamic/DYNAMIC_TYPE_DRAW.html +0 -65
- package/resources/template/bilibili/html/dynamic/DYNAMIC_TYPE_FORWARD.html +0 -178
- package/resources/template/bilibili/html/dynamic/DYNAMIC_TYPE_LIVE_RCMD.html +0 -66
- package/resources/template/bilibili/html/dynamic/DYNAMIC_TYPE_WORD.html +0 -62
- package/resources/template/bilibili/html/userlist.html +0 -26
- package/resources/template/douyin/css/base.css +0 -457
- package/resources/template/douyin/css/commnet.css +0 -496
- package/resources/template/douyin/css/live.css +0 -314
- package/resources/template/douyin/css/userlist.css +0 -77
- package/resources/template/douyin/html/comment.html +0 -90
- package/resources/template/douyin/html/dynamic.html +0 -60
- package/resources/template/douyin/html/live.html +0 -63
- package/resources/template/douyin/html/musicinfo.html +0 -62
- package/resources/template/douyin/html/userlist.html +0 -26
- package/resources/template/extend/css/common.css +0 -416
- package/resources/template/extend/html/default.html +0 -53
- package/resources/template/extend/js/qrcode.min.js +0 -1
- package/resources/template/help/css/index.css +0 -106
- package/resources/template/help/html/index.html +0 -42
- package/resources/template/kuaishou/css/commnet.css +0 -426
- package/resources/template/kuaishou/html/comment.html +0 -84
- package/resources/template/videoView/index.html +0 -241
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,37 @@
|
|
|
1
1
|
# 变更日志
|
|
2
2
|
|
|
3
|
+
## [1.7.1](https://github.com/ikenxuan/karin-plugin-kkk/compare/v1.7.0...v1.7.1) (2025-07-07)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### 🎡 持续集成
|
|
7
|
+
|
|
8
|
+
* fix ([21a2ecb](https://github.com/ikenxuan/karin-plugin-kkk/commit/21a2ecb33d215c5714e45daf595dcbe189456849))
|
|
9
|
+
|
|
10
|
+
## [1.7.0](https://github.com/ikenxuan/karin-plugin-kkk/compare/v1.6.12...v1.7.0) (2025-07-07)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### ✨ 新功能
|
|
14
|
+
|
|
15
|
+
* migrate from Sequelize to TypeORM for database operations ([#108](https://github.com/ikenxuan/karin-plugin-kkk/issues/108)) ([75ee71f](https://github.com/ikenxuan/karin-plugin-kkk/commit/75ee71f65e431f8d2e304129eccb0441e51eadf7))
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### 🐛 错误修复
|
|
19
|
+
|
|
20
|
+
* ci ([7e705aa](https://github.com/ikenxuan/karin-plugin-kkk/commit/7e705aadc3327c9763cb5ecdcd20a5f67b732331))
|
|
21
|
+
* 新版解析库 ([#110](https://github.com/ikenxuan/karin-plugin-kkk/issues/110)) ([f93814a](https://github.com/ikenxuan/karin-plugin-kkk/commit/f93814a5ca51c03390863ecaf6ac4070c4c6bb64))
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
### ✅ 测试相关
|
|
25
|
+
|
|
26
|
+
* ci/cd ([#113](https://github.com/ikenxuan/karin-plugin-kkk/issues/113)) ([dd13df0](https://github.com/ikenxuan/karin-plugin-kkk/commit/dd13df0eca0e21dc7e4ded6592191508d045fa51))
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
### 🎡 持续集成
|
|
30
|
+
|
|
31
|
+
* fix ([5b95a7f](https://github.com/ikenxuan/karin-plugin-kkk/commit/5b95a7fcead63dc5ba18c1c1211565c14acc66f0))
|
|
32
|
+
* fix ([8faccb9](https://github.com/ikenxuan/karin-plugin-kkk/commit/8faccb9570eec6949d3e614d6f35e46cbe4d7f18))
|
|
33
|
+
* test ([#112](https://github.com/ikenxuan/karin-plugin-kkk/issues/112)) ([3ed08ad](https://github.com/ikenxuan/karin-plugin-kkk/commit/3ed08ad45c724f0148bff522cfed498dfbafbd21))
|
|
34
|
+
|
|
3
35
|
## [1.6.12](https://github.com/ikenxuan/karin-plugin-kkk/compare/v1.6.11...v1.6.12) (2025-06-15)
|
|
4
36
|
|
|
5
37
|
|
package/lib/apps/admin.js
CHANGED
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
import fs from "node:fs";
|
|
2
2
|
import karin, { logger } from "node-karin";
|
|
3
3
|
import require$$1 from "path";
|
|
4
|
-
import "
|
|
5
|
-
import "../chunk/db-D3WhtbU7.js";
|
|
4
|
+
import "../chunk/db-BnxnGlE9.js";
|
|
6
5
|
import "../root.js";
|
|
7
|
-
import "../chunk/vendor-
|
|
8
|
-
import { C as Config, a as Common
|
|
6
|
+
import "../chunk/vendor-CrTmFBXK.js";
|
|
7
|
+
import { C as Config, a as Common } from "../chunk/main-SmMgu7lY.js";
|
|
9
8
|
import "node-karin/axios";
|
|
10
9
|
import "stream/promises";
|
|
11
10
|
import "node:path";
|
|
12
|
-
import "@karinjs/md-html";
|
|
13
11
|
const task = Config.app.rmmp4 && karin.task("[kkk-视频缓存自动删除]", "0 0 4 * * *", async () => {
|
|
14
12
|
try {
|
|
15
13
|
await removeAllFiles(Common.tempDri.video);
|
|
@@ -19,11 +17,11 @@ const task = Config.app.rmmp4 && karin.task("[kkk-视频缓存自动删除]", "0
|
|
|
19
17
|
}
|
|
20
18
|
});
|
|
21
19
|
const biLogin = karin.command(/^#?(kkk)?\s*B站\s*(扫码)?\s*登录$/i, async (e) => {
|
|
22
|
-
await
|
|
20
|
+
await e.reply("暂时不可用");
|
|
23
21
|
return true;
|
|
24
22
|
}, { perm: Config.bilibili.loginPerm, name: "kkk-ck管理" });
|
|
25
23
|
const dylogin = karin.command(/^#?(kkk)?抖音(扫码)?登录$/, async (e) => {
|
|
26
|
-
await
|
|
24
|
+
await e.reply("暂时不可用");
|
|
27
25
|
return true;
|
|
28
26
|
}, { perm: Config.douyin.loginPerm, name: "kkk-ck管理" });
|
|
29
27
|
const setdyck = karin.command(/^#?(kkk)?s*设置抖音ck$/i, async (e) => {
|
package/lib/apps/help.js
CHANGED
|
@@ -2,11 +2,10 @@ import fs from "node:fs";
|
|
|
2
2
|
import { markdown } from "@karinjs/md-html";
|
|
3
3
|
import karin, { logs, mkdirSync, render, segment } from "node-karin";
|
|
4
4
|
import { karinPathTemp } from "node-karin/root";
|
|
5
|
-
import "
|
|
6
|
-
import "../chunk/db-D3WhtbU7.js";
|
|
5
|
+
import "../chunk/db-BnxnGlE9.js";
|
|
7
6
|
import { Root } from "../root.js";
|
|
8
|
-
import "../chunk/vendor-
|
|
9
|
-
import { R as Render, a as Common } from "../chunk/main-
|
|
7
|
+
import "../chunk/vendor-CrTmFBXK.js";
|
|
8
|
+
import { R as Render, a as Common } from "../chunk/main-SmMgu7lY.js";
|
|
10
9
|
import "node-karin/axios";
|
|
11
10
|
import "stream/promises";
|
|
12
11
|
const help = karin.command(/^#?kkk帮助$/, async (e) => {
|
package/lib/apps/push.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { d as
|
|
1
|
+
import { d as getDouyinData2, g as getBilibiliData2 } from "../chunk/vendor-CrTmFBXK.js";
|
|
2
2
|
import karin from "node-karin";
|
|
3
|
-
import "
|
|
4
|
-
import "../chunk/db-D3WhtbU7.js";
|
|
3
|
+
import "../chunk/db-BnxnGlE9.js";
|
|
5
4
|
import "../root.js";
|
|
6
5
|
import "node:fs";
|
|
7
|
-
import { C as Config,
|
|
6
|
+
import { C as Config, b as DouYinpush, B as Bilibilipush } from "../chunk/main-SmMgu7lY.js";
|
|
8
7
|
import "node-karin/axios";
|
|
9
8
|
import "stream/promises";
|
|
10
9
|
import "node:path";
|
|
@@ -21,16 +20,16 @@ const bilibiliPush = Config.bilibili.push.switch && karin.task("B站推送", Con
|
|
|
21
20
|
}, { log: Config.bilibili.push.log });
|
|
22
21
|
const forcePush = karin.command(/#(抖音|B站)(全部)?强制推送/, async (e) => {
|
|
23
22
|
if (e.msg.includes("抖音")) {
|
|
24
|
-
await new DouYinpush(
|
|
23
|
+
await new DouYinpush().action();
|
|
25
24
|
return true;
|
|
26
25
|
} else if (e.msg.includes("B站")) {
|
|
27
|
-
await new Bilibilipush(
|
|
26
|
+
await new Bilibilipush().action();
|
|
28
27
|
return true;
|
|
29
28
|
}
|
|
30
29
|
return true;
|
|
31
30
|
}, { name: "𝑪𝒊𝒂𝒍𝒍𝒐~(∠・ω< )⌒★", perm: "master", event: "message.group" });
|
|
32
31
|
const setdyPush = karin.command(/^#设置抖音推送/, async (e) => {
|
|
33
|
-
const data = await
|
|
32
|
+
const data = await getDouyinData2("搜索数据", Config.cookies.douyin, { query: e.msg.replace(/^#设置抖音推送/, ""), typeMode: "strict" });
|
|
34
33
|
await new DouYinpush(e).setting(data);
|
|
35
34
|
return true;
|
|
36
35
|
}, { name: "kkk-推送功能-设置", event: "message.group", perm: Config.douyin.push.permission, dsbAdapter: ["qqbot"] });
|
|
@@ -41,7 +40,7 @@ const setbiliPush = karin.command(/^#设置[bB]站推送(?:[Uu][Ii][Dd]:)?(\d+)$
|
|
|
41
40
|
}
|
|
42
41
|
const match = /^#设置[bB]站推送(?:UID:)?(\d+)$/.exec(e.msg);
|
|
43
42
|
if (match && match[1]) {
|
|
44
|
-
const data = await
|
|
43
|
+
const data = await getBilibiliData2("用户主页数据", Config.cookies.bilibili, { host_mid: Number(match[1]), typeMode: "strict" });
|
|
45
44
|
await new Bilibilipush(e).setting(data);
|
|
46
45
|
}
|
|
47
46
|
return true;
|
|
@@ -55,7 +54,7 @@ const douyinPushList = karin.command(/^#?抖音推送列表$/, async (e) => {
|
|
|
55
54
|
const changeBotID = karin.command(/^#kkk设置推送机器人/, async (e) => {
|
|
56
55
|
const newDouyinlist = Config.pushlist.douyin.map((item) => {
|
|
57
56
|
const modifiedGroupIds = item.group_id.map((groupId) => {
|
|
58
|
-
const [group_id
|
|
57
|
+
const [group_id] = groupId.split(":");
|
|
59
58
|
return `${group_id}:${e.msg.replace(/^#kkk设置推送机器人/, "")}`;
|
|
60
59
|
});
|
|
61
60
|
return {
|
|
@@ -65,7 +64,7 @@ const changeBotID = karin.command(/^#kkk设置推送机器人/, async (e) => {
|
|
|
65
64
|
});
|
|
66
65
|
const newBilibililist = Config.pushlist.bilibili.map((item) => {
|
|
67
66
|
const modifiedGroupIds = item.group_id.map((groupId) => {
|
|
68
|
-
const [group_id
|
|
67
|
+
const [group_id] = groupId.split(":");
|
|
69
68
|
return `${group_id}:${e.msg.replace(/^#kkk设置推送机器人/, "")}`;
|
|
70
69
|
});
|
|
71
70
|
return {
|
package/lib/apps/tools.js
CHANGED
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
import karin, { logger } from "node-karin";
|
|
2
|
-
import "
|
|
3
|
-
import "../chunk/db-D3WhtbU7.js";
|
|
2
|
+
import "../chunk/db-BnxnGlE9.js";
|
|
4
3
|
import "../root.js";
|
|
5
4
|
import "node:fs";
|
|
6
|
-
import "../chunk/vendor-
|
|
7
|
-
import {
|
|
5
|
+
import "../chunk/vendor-CrTmFBXK.js";
|
|
6
|
+
import { c as getDouyinID, d as DouYin, C as Config, e as getBilibiliID, f as Bilibili, h as getKuaishouID, i as fetchKuaishouData, K as Kuaishou, a as Common } from "../chunk/main-SmMgu7lY.js";
|
|
8
7
|
import "node-karin/axios";
|
|
9
8
|
import "stream/promises";
|
|
10
9
|
import "node:path";
|
|
11
10
|
import "node:child_process";
|
|
12
11
|
import "playwright";
|
|
13
12
|
const reg = {
|
|
14
|
-
douyin:
|
|
15
|
-
bilibili:
|
|
16
|
-
kuaishou:
|
|
13
|
+
douyin: /^.*((www|v|jx|m)\.(douyin|iesdouyin)\.com|douyin\.com\/(video|note)).*/,
|
|
14
|
+
bilibili: /(bilibili.com|b23.tv|t.bilibili.com|bili2233.cn|BV[a-zA-Z0-9]{10,})/,
|
|
15
|
+
kuaishou: /^((.*)快手(.*)快手(.*)|(.*)v\.kuaishou(.*))$/
|
|
17
16
|
};
|
|
18
17
|
const douyin = karin.command(reg.douyin, async (e) => {
|
|
19
18
|
const url = String(e.msg.match(/(http|https):\/\/.*\.(douyin|iesdouyin)\.com\/[^ ]+/g));
|
|
@@ -23,7 +22,7 @@ const douyin = karin.command(reg.douyin, async (e) => {
|
|
|
23
22
|
}, { name: "kkk-视频功能-抖音", priority: Config.app.defaulttool ? -Infinity : 800 });
|
|
24
23
|
const bilibili = karin.command(reg.bilibili, async (e) => {
|
|
25
24
|
e.msg = e.msg.replace(/\\/g, "");
|
|
26
|
-
const urlRegex = /(https?:\/\/(?:www\.bilibili\.com|m\.bilibili\.com|t\.bilibili\.com|b23\.tv|bili2233\.cn)\/[a-zA-Z0-9_
|
|
25
|
+
const urlRegex = /(https?:\/\/(?:www\.bilibili\.com|m\.bilibili\.com|t\.bilibili\.com|b23\.tv|bili2233\.cn)\/[a-zA-Z0-9_\-.~:/?#[\]@!$&'()*+,;=]+)/;
|
|
27
26
|
const bvRegex = /^BV[1-9a-zA-Z]{10}$/;
|
|
28
27
|
let url = null;
|
|
29
28
|
const urlMatch = e.msg.match(urlRegex);
|