karin-plugin-kkk 2.15.0 → 2.15.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 +21 -0
- package/README.md +31 -74
- package/lib/apps/admin.js +3 -3
- package/lib/apps/help.js +3 -3
- package/lib/apps/push.js +3 -3
- package/lib/apps/tools.js +3 -3
- package/lib/apps/update.js +4 -4
- package/lib/build-metadata.json +5 -5
- package/lib/core_chunk/{main-_8wEBpbS.js → main-14od0VyY.js} +69 -79
- package/lib/core_chunk/{rolldown-runtime-BMXAG3ag.js → rolldown-runtime-FWYmKKAj.js} +1 -2
- package/lib/core_chunk/{template-CuCBcPSZ.js → template-UGmQ7vUV.js} +2 -2
- package/lib/core_chunk/template.js +2 -2
- package/lib/core_chunk/{vendor-fLu5LGop.js → vendor-DoVeMvEg.js} +78927 -3531
- package/lib/index.js +3 -3
- package/lib/root.js +1 -1
- package/lib/web.config.js +3 -3
- package/lib/web_chunk/assets/{Combination-BGjl_XHZ.js → Combination-BHJal5hU.js} +1 -1
- package/lib/web_chunk/assets/{avatar-DvNLdzaV.js → avatar-Bk-l0vwp.js} +1 -1
- package/lib/web_chunk/assets/core-BktEBjVB.js +1 -0
- package/lib/web_chunk/assets/{eye-D70hmpMD.js → eye-DKV8219y.js} +1 -1
- package/lib/web_chunk/assets/{index-DWie0hsO.js → index-CrQKpnky.js} +2 -2
- package/lib/web_chunk/assets/{jszip.min-BQ81l3RP.js → jszip.min-CRbx4NQr.js} +1 -1
- package/lib/web_chunk/assets/{page-kWBuSApz.js → page-3eH1NE5B.js} +1 -1
- package/lib/web_chunk/assets/{page-BthXA3YN.js → page-CXeTxMT1.js} +2 -2
- package/lib/web_chunk/assets/{page-DWbwZQ1D.js → page-Cd6drSuq.js} +1 -1
- package/lib/web_chunk/assets/{page-BxI4385t.js → page-D5DkJUyl.js} +1 -1
- package/lib/web_chunk/assets/{page-CizrRmRi.js → page-DVOFQ8PQ.js} +4 -4
- package/lib/web_chunk/assets/{parsers-S_3kruuS.js → parsers-DG8cIK4g.js} +1 -1
- package/lib/web_chunk/assets/{request-Dn9HXpZd.js → request-DTUmEUrr.js} +1 -1
- package/lib/web_chunk/assets/{select-hDhjjcal.js → select-DLWN_-Ck.js} +1 -1
- package/lib/web_chunk/assets/{separator-DS4F13Xm.js → separator-CJxDARm4.js} +1 -1
- package/lib/web_chunk/index.html +1 -1
- package/lib/web_chunk/sw.js +1 -1
- package/package.json +4 -1
- package/lib/apps/test-verification.js +0 -4
- package/lib/web_chunk/assets/core-BJSOot83.js +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,27 @@
|
|
|
2
2
|
|
|
3
3
|
# Changelog
|
|
4
4
|
|
|
5
|
+
## [2.15.2](https://github.com/ikenxuan/karin-plugin-kkk/compare/v2.15.1...v2.15.2) (2025-12-07)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### 🐛 错误修复
|
|
9
|
+
|
|
10
|
+
* 更新小红书算法v4.86.0 ([d133a54](https://github.com/ikenxuan/karin-plugin-kkk/commit/d133a54b37b3cecb81ae6b92e72d48dc95629e12))
|
|
11
|
+
* 更新状态判断失误 ([0598334](https://github.com/ikenxuan/karin-plugin-kkk/commit/0598334cd281e040a7dba7d8349ccd6c0ce3f2d9))
|
|
12
|
+
* 迁移到@snapka/puppeteer ([#232](https://github.com/ikenxuan/karin-plugin-kkk/issues/232)) ([848926b](https://github.com/ikenxuan/karin-plugin-kkk/commit/848926bb4463149847d0f40e0bb0e5c4d2f0bc64))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### 📝 文档更新
|
|
16
|
+
|
|
17
|
+
* readme ([bdb3468](https://github.com/ikenxuan/karin-plugin-kkk/commit/bdb3468d67bef7df4c81ebbbd400f00ae4b87a31))
|
|
18
|
+
|
|
19
|
+
## [2.15.1](https://github.com/ikenxuan/karin-plugin-kkk/compare/v2.15.0...v2.15.1) (2025-12-02)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
### 🐛 错误修复
|
|
23
|
+
|
|
24
|
+
* 删除测试命令 ([cf18e81](https://github.com/ikenxuan/karin-plugin-kkk/commit/cf18e81e8bcae6db48b6504d10b9c9b4262aad85))
|
|
25
|
+
|
|
5
26
|
## [2.15.0](https://github.com/ikenxuan/karin-plugin-kkk/compare/v2.14.0...v2.15.0) (2025-12-02)
|
|
6
27
|
|
|
7
28
|
|
package/README.md
CHANGED
|
@@ -1,79 +1,53 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
1
3
|
# karin-plugin-kkk
|
|
2
4
|
|
|
3
5
|
[](https://pkg.pr.new/~/ikenxuan/karin-plugin-kkk)
|
|
4
6
|
|
|
5
|
-
|
|
7
|
+
_Karin 的「抖音」「B 站」视频解析/动态推送插件_
|
|
6
8
|
|
|
7
|
-
|
|
9
|
+
> 提供对 Bot 的视频解析和动态推送功能,通过接口获取数据并渲染图片返回
|
|
8
10
|
|
|
9
|
-
|
|
11
|
+
</div>
|
|
10
12
|
|
|
11
|
-
|
|
13
|
+
---
|
|
12
14
|
|
|
13
|
-
|
|
15
|
+
## Feature
|
|
14
16
|
|
|
15
|
-
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
pnpm add karin-plugin-kkk@latest -w
|
|
20
|
-
```
|
|
17
|
+
- **视频解析** - 自动解析抖音、B站、快手、小红书链接
|
|
18
|
+
- **动态推送** - 订阅博主/UP主,自动推送最新动态
|
|
19
|
+
- **扫码登录** - 支持扫码获取平台 Cookies
|
|
20
|
+
- **WebUI 配置** - 通过 Karin WebUI 轻松管理插件
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
## Quick Start
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
推荐通过 **Karin WebUI 插件市场** 安装,或使用命令:
|
|
25
25
|
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
```sh
|
|
27
|
+
pnpm add karin-plugin-kkk@latest -w
|
|
28
|
+
```
|
|
28
29
|
|
|
29
|
-
|
|
30
|
+
> 首次使用请务必查看文档了解配置方法
|
|
30
31
|
|
|
31
|
-
|
|
32
|
-
反馈群:[795874649](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=S8y6baEcSkO6TEO5kEdfgmJhz79Oxdw5&authKey=ficWQytHGz3KIv5i0HpGbEeMBpABBXfjEMYRzo3ZwMV%2B0Y5mq8cC0Yxbczfa904H&noverify=0&group_code=795874649)
|
|
32
|
+
## Link
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
| 文档 | [](https://karin-plugin-kkk-docs.vercel.app) | [](https://karin-plugin-kkk-docs.netlify.app) |
|
|
35
|
+
|:-:|:-:|:-:|
|
|
36
|
+
| QQ 群 | [](https://qm.qq.com/q/DgLbCERYVG) | |
|
|
37
|
+
| DeepWiki | [](https://deepwiki.com/ikenxuan/karin-plugin-kkk) | |
|
|
35
38
|
|
|
36
|
-
|
|
37
|
-
<summary>点击展开</summary>
|
|
39
|
+
## Thanks
|
|
38
40
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
```sh
|
|
42
|
-
git clone https://github.com/你的GitHub用户名/karin-plugin-kkk.git
|
|
43
|
-
```
|
|
44
|
-
3. 安装依赖
|
|
45
|
-
```sh
|
|
46
|
-
pnpm i
|
|
47
|
-
```
|
|
48
|
-
4. 启动开发环境
|
|
49
|
-
```sh
|
|
50
|
-
# tsx 监听core子包文件变化并自动重启
|
|
51
|
-
pnpm watch
|
|
52
|
-
```
|
|
53
|
-
```sh
|
|
54
|
-
# 调试图片模板
|
|
55
|
-
pnpm template
|
|
56
|
-
```
|
|
57
|
-
```sh
|
|
58
|
-
# 调试自带的web
|
|
59
|
-
pnpm web
|
|
60
|
-
```
|
|
61
|
-
```sh
|
|
62
|
-
# 打包
|
|
63
|
-
pnpm build
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
</details>
|
|
41
|
+
- [Karin](https://github.com/Karinjs/Karin) - Bot 框架
|
|
42
|
+
- [amagi](https://github.com/ikenxuan/amagi) - 接口文档与加密参数算法
|
|
67
43
|
|
|
68
|
-
##
|
|
69
|
-
|
|
70
|
-
> 🌟 星光闪烁,你们的智慧如同璀璨的夜空。感谢所有为 **karin-plugin-kkk** 做出贡献的人!
|
|
44
|
+
## Contributors
|
|
71
45
|
|
|
72
46
|
<a href="https://github.com/ikenxuan/karin-plugin-kkk/graphs/contributors">
|
|
73
47
|
<img src="https://contrib.rocks/image?repo=ikenxuan/karin-plugin-kkk" />
|
|
74
48
|
</a>
|
|
75
49
|
|
|
76
|
-

|
|
77
51
|
|
|
78
52
|
## Star History
|
|
79
53
|
|
|
@@ -85,27 +59,10 @@ pnpm build
|
|
|
85
59
|
</picture>
|
|
86
60
|
</a>
|
|
87
61
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
**业务站点**
|
|
91
|
-
|
|
92
|
-
- [www.douyin.com](https://www.douyin.com) & [www.bilibili.com](https://www.bilibili.com) & [www.kuaishou.com](https://www.kuaishou.com)
|
|
93
|
-
|
|
94
|
-
本项目的开发参考了以下开源项目部分代码,排名不分先后
|
|
95
|
-
|
|
96
|
-
**接口文档与加密参数算法**
|
|
97
|
-
|
|
98
|
-
- [ikenxuan/amagi](https://github.com/ikenxuan/amagi)
|
|
99
|
-
- 更多待补充...
|
|
100
|
-
|
|
101
|
-
**友情链接**
|
|
102
|
-
|
|
103
|
-
- Karin 框架 [**GitHub**](https://github.com/Karinjs/Karin) | [**文档**](https://karin.fun)
|
|
104
|
-
|
|
105
|
-
## 🧷 许可证
|
|
62
|
+
---
|
|
106
63
|
|
|
107
|
-
|
|
64
|
+
## License
|
|
108
65
|
|
|
109
|
-
|
|
66
|
+
本项目采用 [**GPL-3.0**](./LICENSE) 开源。
|
|
110
67
|
|
|
111
|
-
|
|
68
|
+
**未经同意,禁止将本项目的开源代码用于任何商业目的。因使用本项目产生的一切问题与后果由使用者自行承担,项目开发者不承担任何责任。**
|
package/lib/apps/admin.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../core_chunk/vendor-
|
|
2
|
-
import { C as
|
|
3
|
-
import "../core_chunk/template-
|
|
1
|
+
import "../core_chunk/vendor-DoVeMvEg.js";
|
|
2
|
+
import { C as setbilick, S as removeAllFiles, T as task, b as biLogin, w as setdyck, x as dylogin } from "../core_chunk/main-14od0VyY.js";
|
|
3
|
+
import "../core_chunk/template-UGmQ7vUV.js";
|
|
4
4
|
export { biLogin, dylogin, removeAllFiles, setbilick, setdyck, task };
|
package/lib/apps/help.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../core_chunk/vendor-
|
|
2
|
-
import {
|
|
3
|
-
import "../core_chunk/template-
|
|
1
|
+
import "../core_chunk/vendor-DoVeMvEg.js";
|
|
2
|
+
import { v as help, y as version } from "../core_chunk/main-14od0VyY.js";
|
|
3
|
+
import "../core_chunk/template-UGmQ7vUV.js";
|
|
4
4
|
export { help, version };
|
package/lib/apps/push.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../core_chunk/vendor-
|
|
2
|
-
import { _ as
|
|
3
|
-
import "../core_chunk/template-
|
|
1
|
+
import "../core_chunk/vendor-DoVeMvEg.js";
|
|
2
|
+
import { _ as testDouyinPush, d as changeBotID, f as douyinPush, g as setdyPush, h as setbiliPush, l as bilibiliPush, m as forcePush, p as douyinPushList, u as bilibiliPushList } from "../core_chunk/main-14od0VyY.js";
|
|
3
|
+
import "../core_chunk/template-UGmQ7vUV.js";
|
|
4
4
|
export { bilibiliPush, bilibiliPushList, changeBotID, douyinPush, douyinPushList, forcePush, setbiliPush, setdyPush, testDouyinPush };
|
package/lib/apps/tools.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../core_chunk/vendor-
|
|
2
|
-
import { a as
|
|
3
|
-
import "../core_chunk/template-
|
|
1
|
+
import "../core_chunk/vendor-DoVeMvEg.js";
|
|
2
|
+
import { a as douyinAPP, c as xiaohongshuAPP, i as bilibiliAPP, o as kuaishouAPP, s as prefix } from "../core_chunk/main-14od0VyY.js";
|
|
3
|
+
import "../core_chunk/template-UGmQ7vUV.js";
|
|
4
4
|
export { bilibiliAPP, douyinAPP, kuaishouAPP, prefix, xiaohongshuAPP };
|
package/lib/apps/update.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../core_chunk/vendor-
|
|
2
|
-
import {
|
|
3
|
-
import "../core_chunk/template-
|
|
4
|
-
export { kkkUpdate, kkkUpdateCommand,
|
|
1
|
+
import "../core_chunk/vendor-DoVeMvEg.js";
|
|
2
|
+
import { n as kkkUpdateCommand, r as update, t as kkkUpdate } from "../core_chunk/main-14od0VyY.js";
|
|
3
|
+
import "../core_chunk/template-UGmQ7vUV.js";
|
|
4
|
+
export { kkkUpdate, kkkUpdateCommand, update };
|
package/lib/build-metadata.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "2.15.
|
|
3
|
-
"buildTime": "2025-12-
|
|
4
|
-
"buildTimestamp":
|
|
2
|
+
"version": "2.15.2",
|
|
3
|
+
"buildTime": "2025-12-07T14:57:09.347Z",
|
|
4
|
+
"buildTimestamp": 1765119429348,
|
|
5
5
|
"name": "karin-plugin-kkk",
|
|
6
6
|
"description": "Karin 的「抖音」「B 站」视频解析/动态推送插件",
|
|
7
7
|
"homepage": "https://github.com/ikenxuan/karin-plugin-kkk",
|
|
8
|
-
"commitHash": "
|
|
9
|
-
"shortCommitHash": "
|
|
8
|
+
"commitHash": "a6d00dd45e3affb9bbaef3980dff01e48c8ff492",
|
|
9
|
+
"shortCommitHash": "a6d00dd4"
|
|
10
10
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Bt as
|
|
3
|
-
import { n as init_client, r as reactServerRender } from "./template-
|
|
1
|
+
import { a as __toESM, n as __esmMin, r as __export } from "./rolldown-runtime-FWYmKKAj.js";
|
|
2
|
+
import { A as differenceInSeconds, Bt as MajorType, C as zhCN, D as fromUnixTime, E as init_date_fns, Ft as require_dist, Gt as init_default, Ht as createBilibiliRoutes, It as require_lib$1, Jt as wbi_sign, Kt as logMiddleware, Lt as require_lib, O as formatDistanceToNow, Rt as Client, S as init_locale, Ut as createDouyinRoutes, Vt as bilibiliApiUrls, Wt as createKuaishouRoutes, Xt as init_dist, Yt as express, a as Window, i as init_lib, k as format$1, n as require_heic_convert, qt as logger$1, r as require_qr_code_styling, t as snapka, zt as DynamicType } from "./vendor-DoVeMvEg.js";
|
|
3
|
+
import { n as init_client, r as reactServerRender } from "./template-UGmQ7vUV.js";
|
|
4
4
|
import path, { resolve } from "node:path";
|
|
5
5
|
import fs from "node:fs";
|
|
6
6
|
import { fileURLToPath } from "node:url";
|
|
@@ -15,7 +15,6 @@ import { pipeline } from "node:stream/promises";
|
|
|
15
15
|
import axios, { AxiosError } from "node-karin/axios";
|
|
16
16
|
import template from "node-karin/template";
|
|
17
17
|
import _ from "node-karin/lodash";
|
|
18
|
-
import { launch } from "@karinjs/plugin-puppeteer";
|
|
19
18
|
import { newInjectedPage } from "fingerprint-injector";
|
|
20
19
|
var resolvePluginRoot, pluginPath, pkg, Root;
|
|
21
20
|
var init_root = __esmMin(() => {
|
|
@@ -939,6 +938,57 @@ var init_plugins = __esmMin(() => {
|
|
|
939
938
|
}
|
|
940
939
|
});
|
|
941
940
|
});
|
|
941
|
+
var semver_exports = __export({ isSemverGreater: () => isSemverGreater });
|
|
942
|
+
var isSemverGreater;
|
|
943
|
+
var init_semver = __esmMin(() => {
|
|
944
|
+
isSemverGreater = (remote, local) => {
|
|
945
|
+
const parse = (v) => {
|
|
946
|
+
v = v.trim();
|
|
947
|
+
if (v.startsWith("v") || v.startsWith("V")) v = v.slice(1);
|
|
948
|
+
const [preBuild] = v.split("+", 2);
|
|
949
|
+
const [core, pre] = preBuild.split("-", 2);
|
|
950
|
+
const parts = core.split(".");
|
|
951
|
+
return {
|
|
952
|
+
major: parseInt(parts[0] || "0", 10) || 0,
|
|
953
|
+
minor: parseInt(parts[1] || "0", 10) || 0,
|
|
954
|
+
patch: parseInt(parts[2] || "0", 10) || 0,
|
|
955
|
+
prerelease: pre ? pre.split(".") : []
|
|
956
|
+
};
|
|
957
|
+
};
|
|
958
|
+
const cmpId = (a, b) => {
|
|
959
|
+
const an = /^\d+$/.test(a);
|
|
960
|
+
const bn = /^\d+$/.test(b);
|
|
961
|
+
if (an && bn) {
|
|
962
|
+
const na = parseInt(a, 10);
|
|
963
|
+
const nb = parseInt(b, 10);
|
|
964
|
+
if (na === nb) return 0;
|
|
965
|
+
return na > nb ? 1 : -1;
|
|
966
|
+
}
|
|
967
|
+
if (an && !bn) return -1;
|
|
968
|
+
if (!an && bn) return 1;
|
|
969
|
+
if (a === b) return 0;
|
|
970
|
+
return a > b ? 1 : -1;
|
|
971
|
+
};
|
|
972
|
+
const r = parse(remote);
|
|
973
|
+
const l = parse(local);
|
|
974
|
+
if (r.major !== l.major) return r.major > l.major;
|
|
975
|
+
if (r.minor !== l.minor) return r.minor > l.minor;
|
|
976
|
+
if (r.patch !== l.patch) return r.patch > l.patch;
|
|
977
|
+
const ra = r.prerelease;
|
|
978
|
+
const la = l.prerelease;
|
|
979
|
+
if (ra.length === 0 && la.length === 0) return false;
|
|
980
|
+
if (ra.length === 0 && la.length > 0) return true;
|
|
981
|
+
if (ra.length > 0 && la.length === 0) return false;
|
|
982
|
+
const len = Math.min(ra.length, la.length);
|
|
983
|
+
for (const [i, raItem] of ra.entries()) {
|
|
984
|
+
if (i >= len) break;
|
|
985
|
+
const c = cmpId(raItem, la[i]);
|
|
986
|
+
if (c !== 0) return c > 0;
|
|
987
|
+
}
|
|
988
|
+
if (ra.length !== la.length) return ra.length > la.length;
|
|
989
|
+
return false;
|
|
990
|
+
};
|
|
991
|
+
});
|
|
942
992
|
var Render;
|
|
943
993
|
var init_Render = __esmMin(async () => {
|
|
944
994
|
await init_client();
|
|
@@ -958,8 +1008,9 @@ var init_Render = __esmMin(async () => {
|
|
|
958
1008
|
let hasUpdate = false;
|
|
959
1009
|
if (!Config.app.RemoveWatermark) try {
|
|
960
1010
|
const { db: db$1 } = await import("node-karin");
|
|
1011
|
+
const { isSemverGreater: isSemverGreater$1 } = await Promise.resolve().then(() => (init_semver(), semver_exports));
|
|
961
1012
|
const lockedVersion = await db$1.get("kkk:update:lock");
|
|
962
|
-
if (typeof lockedVersion === "string" && lockedVersion.length > 0) hasUpdate =
|
|
1013
|
+
if (typeof lockedVersion === "string" && lockedVersion.length > 0) hasUpdate = isSemverGreater$1(lockedVersion, Root.pluginVersion);
|
|
963
1014
|
} catch {}
|
|
964
1015
|
const result = await reactServerRender({
|
|
965
1016
|
request: {
|
|
@@ -7644,9 +7695,8 @@ var safeScreenshot = async (page, screenshotPath) => {
|
|
|
7644
7695
|
const douyinLogin = async (e) => {
|
|
7645
7696
|
const msg_id = [];
|
|
7646
7697
|
try {
|
|
7647
|
-
const
|
|
7648
|
-
headless:
|
|
7649
|
-
downloadBrowser: "chrome-headless-shell",
|
|
7698
|
+
const puppeteer = await snapka.launch({
|
|
7699
|
+
headless: "new",
|
|
7650
7700
|
protocolTimeout: 6e4,
|
|
7651
7701
|
args: [
|
|
7652
7702
|
"--disable-blink-features=AutomationControlled",
|
|
@@ -7692,7 +7742,7 @@ const douyinLogin = async (e) => {
|
|
|
7692
7742
|
if (os$1 === "darwin") return "macos";
|
|
7693
7743
|
return "linux";
|
|
7694
7744
|
};
|
|
7695
|
-
const page = await newInjectedPage(browser, { fingerprintOptions: {
|
|
7745
|
+
const page = await newInjectedPage(puppeteer.browser, { fingerprintOptions: {
|
|
7696
7746
|
devices: ["desktop"],
|
|
7697
7747
|
operatingSystems: [getOperatingSystem()]
|
|
7698
7748
|
} });
|
|
@@ -7735,7 +7785,7 @@ const douyinLogin = async (e) => {
|
|
|
7735
7785
|
logger.error("获取二维码失败:", error);
|
|
7736
7786
|
await e.reply("获取二维码失败,请查看控制台日志", { reply: true });
|
|
7737
7787
|
}
|
|
7738
|
-
await browser.close();
|
|
7788
|
+
await puppeteer.browser.close();
|
|
7739
7789
|
return true;
|
|
7740
7790
|
}
|
|
7741
7791
|
let gcInterval;
|
|
@@ -7785,7 +7835,7 @@ const douyinLogin = async (e) => {
|
|
|
7785
7835
|
clearTimeout(timer);
|
|
7786
7836
|
logger.mark("检测到 sid_guard,登录成功");
|
|
7787
7837
|
logger.debug("开始获取 cookies...");
|
|
7788
|
-
const cookies = await browser.cookies();
|
|
7838
|
+
const cookies = await puppeteer.browser.cookies();
|
|
7789
7839
|
logger.debug(`获取到 ${cookies.length} 个 cookies`);
|
|
7790
7840
|
const cookieString = cookies.map((cookie) => `${cookie.name}=${cookie.value}`).join("; ");
|
|
7791
7841
|
logger.debug("开始保存 cookies...");
|
|
@@ -7796,7 +7846,7 @@ const douyinLogin = async (e) => {
|
|
|
7796
7846
|
await e.bot.recallMsg(e.contact, id);
|
|
7797
7847
|
}));
|
|
7798
7848
|
logger.mark("关闭浏览器...");
|
|
7799
|
-
await browser.close();
|
|
7849
|
+
await puppeteer.browser.close();
|
|
7800
7850
|
logger.mark("浏览器已关闭");
|
|
7801
7851
|
resolve$1(true);
|
|
7802
7852
|
return;
|
|
@@ -7845,7 +7895,7 @@ const douyinLogin = async (e) => {
|
|
|
7845
7895
|
logger.warn("2FA验证码输入超时");
|
|
7846
7896
|
clearTimeout(timer);
|
|
7847
7897
|
if (gcInterval) clearInterval(gcInterval);
|
|
7848
|
-
await browser.close();
|
|
7898
|
+
await puppeteer.browser.close();
|
|
7849
7899
|
await Promise.all(msg_id.map(async (id) => {
|
|
7850
7900
|
await e.bot.recallMsg(e.contact, id);
|
|
7851
7901
|
}));
|
|
@@ -7898,7 +7948,7 @@ const douyinLogin = async (e) => {
|
|
|
7898
7948
|
logger.warn("验证码错误次数过多,登录失败");
|
|
7899
7949
|
clearTimeout(timer);
|
|
7900
7950
|
if (gcInterval) clearInterval(gcInterval);
|
|
7901
|
-
await browser.close();
|
|
7951
|
+
await puppeteer.browser.close();
|
|
7902
7952
|
await Promise.all(msg_id.map(async (id) => {
|
|
7903
7953
|
await e.bot.recallMsg(e.contact, id);
|
|
7904
7954
|
}));
|
|
@@ -7912,7 +7962,7 @@ const douyinLogin = async (e) => {
|
|
|
7912
7962
|
logger.error("二次验证处理失败:", err);
|
|
7913
7963
|
clearTimeout(timer);
|
|
7914
7964
|
if (gcInterval) clearInterval(gcInterval);
|
|
7915
|
-
await browser.close();
|
|
7965
|
+
await puppeteer.browser.close();
|
|
7916
7966
|
await Promise.all(msg_id.map(async (id) => {
|
|
7917
7967
|
await e.bot.recallMsg(e.contact, id);
|
|
7918
7968
|
}));
|
|
@@ -7930,14 +7980,14 @@ const douyinLogin = async (e) => {
|
|
|
7930
7980
|
if (gcInterval) clearInterval(gcInterval);
|
|
7931
7981
|
if (!loginResult) {
|
|
7932
7982
|
logger.warn("登录超时或失败");
|
|
7933
|
-
await browser.close();
|
|
7983
|
+
await puppeteer.browser.close();
|
|
7934
7984
|
await e.reply("登录超时!二维码已失效!", { reply: true });
|
|
7935
7985
|
return true;
|
|
7936
7986
|
}
|
|
7937
7987
|
} catch (err) {
|
|
7938
7988
|
logger.error("登录流程出错:", err);
|
|
7939
7989
|
if (gcInterval) clearInterval(gcInterval);
|
|
7940
|
-
await browser.close();
|
|
7990
|
+
await puppeteer.browser.close();
|
|
7941
7991
|
await e.reply("登录过程出错,请查看控制台日志", { reply: true });
|
|
7942
7992
|
}
|
|
7943
7993
|
} catch (error) {
|
|
@@ -8342,15 +8392,6 @@ const testDouyinPush = karin.command(/^#测试抖音推送\s*(https?:\/\/[^\s]+)
|
|
|
8342
8392
|
dsbAdapter: ["qqbot"],
|
|
8343
8393
|
priority: -Infinity
|
|
8344
8394
|
});
|
|
8345
|
-
await init_amagiClient();
|
|
8346
|
-
const testVerification = karin.command(/^#?测试b站验证$/, wrapWithErrorHandler(async (e) => {
|
|
8347
|
-
for (let i = 0; i < 200; i++) await getBilibiliData("用户空间详细信息", {
|
|
8348
|
-
host_mid: 114514,
|
|
8349
|
-
typeMode: "strict"
|
|
8350
|
-
});
|
|
8351
|
-
await e.reply("未触发风控,测试完成");
|
|
8352
|
-
return e;
|
|
8353
|
-
}, { businessName: "测试B站验证" }));
|
|
8354
8395
|
const getXiaohongshuID = async (url$1, log = true) => {
|
|
8355
8396
|
const longLink = (await axios.get(url$1, { headers: { "User-Agent": "Apifox/1.0.0 (https://apifox.com)" } }))?.request?.res?.responseUrl ?? url$1;
|
|
8356
8397
|
const normalizedLink = (() => {
|
|
@@ -8912,54 +8953,8 @@ const getChangelogImage = async (props) => {
|
|
|
8912
8953
|
buildTime
|
|
8913
8954
|
}) || null;
|
|
8914
8955
|
};
|
|
8915
|
-
const isSemverGreater = (remote, local) => {
|
|
8916
|
-
const parse = (v) => {
|
|
8917
|
-
v = v.trim();
|
|
8918
|
-
if (v.startsWith("v") || v.startsWith("V")) v = v.slice(1);
|
|
8919
|
-
const [preBuild] = v.split("+", 2);
|
|
8920
|
-
const [core, pre] = preBuild.split("-", 2);
|
|
8921
|
-
const parts = core.split(".");
|
|
8922
|
-
return {
|
|
8923
|
-
major: parseInt(parts[0] || "0", 10) || 0,
|
|
8924
|
-
minor: parseInt(parts[1] || "0", 10) || 0,
|
|
8925
|
-
patch: parseInt(parts[2] || "0", 10) || 0,
|
|
8926
|
-
prerelease: pre ? pre.split(".") : []
|
|
8927
|
-
};
|
|
8928
|
-
};
|
|
8929
|
-
const cmpId = (a, b) => {
|
|
8930
|
-
const an = /^\d+$/.test(a);
|
|
8931
|
-
const bn = /^\d+$/.test(b);
|
|
8932
|
-
if (an && bn) {
|
|
8933
|
-
const na = parseInt(a, 10);
|
|
8934
|
-
const nb = parseInt(b, 10);
|
|
8935
|
-
if (na === nb) return 0;
|
|
8936
|
-
return na > nb ? 1 : -1;
|
|
8937
|
-
}
|
|
8938
|
-
if (an && !bn) return -1;
|
|
8939
|
-
if (!an && bn) return 1;
|
|
8940
|
-
if (a === b) return 0;
|
|
8941
|
-
return a > b ? 1 : -1;
|
|
8942
|
-
};
|
|
8943
|
-
const r = parse(remote);
|
|
8944
|
-
const l = parse(local);
|
|
8945
|
-
if (r.major !== l.major) return r.major > l.major;
|
|
8946
|
-
if (r.minor !== l.minor) return r.minor > l.minor;
|
|
8947
|
-
if (r.patch !== l.patch) return r.patch > l.patch;
|
|
8948
|
-
const ra = r.prerelease;
|
|
8949
|
-
const la = l.prerelease;
|
|
8950
|
-
if (ra.length === 0 && la.length === 0) return false;
|
|
8951
|
-
if (ra.length === 0 && la.length > 0) return true;
|
|
8952
|
-
if (ra.length > 0 && la.length === 0) return false;
|
|
8953
|
-
const len = Math.min(ra.length, la.length);
|
|
8954
|
-
for (const [i, raItem] of ra.entries()) {
|
|
8955
|
-
if (i >= len) break;
|
|
8956
|
-
const c = cmpId(raItem, la[i]);
|
|
8957
|
-
if (c !== 0) return c > 0;
|
|
8958
|
-
}
|
|
8959
|
-
if (ra.length !== la.length) return ra.length > la.length;
|
|
8960
|
-
return false;
|
|
8961
|
-
};
|
|
8962
8956
|
await init_module();
|
|
8957
|
+
await init_semver();
|
|
8963
8958
|
var UPDATE_LOCK_KEY = "kkk:update:lock";
|
|
8964
8959
|
var UPDATE_MSGID_KEY = "kkk:update:msgId";
|
|
8965
8960
|
var Handler = async (e) => {
|
|
@@ -9056,13 +9051,8 @@ const kkkUpdateCommand = karin.command(/^#?kkk更新$/, async (e) => {
|
|
|
9056
9051
|
await e.reply(`${Root.pluginName} 更新失败: ${error.message}`);
|
|
9057
9052
|
}
|
|
9058
9053
|
}, { name: "kkk-更新" });
|
|
9059
|
-
const kkkUpdateTest = karin.command("test", async (e) => {
|
|
9060
|
-
await db.del(UPDATE_MSGID_KEY);
|
|
9061
|
-
await db.del(UPDATE_LOCK_KEY);
|
|
9062
|
-
return Handler(e);
|
|
9063
|
-
});
|
|
9064
9054
|
const update = karin.task("kkk-更新检测", "*/10 * * * *", Handler, {
|
|
9065
9055
|
name: "kkk-更新检测",
|
|
9066
9056
|
log: false
|
|
9067
9057
|
});
|
|
9068
|
-
export {
|
|
9058
|
+
export { setbilick as C, web_config_default as D, webConfig as E, Root as O, removeAllFiles as S, task as T, testDouyinPush as _, douyinAPP as a, biLogin as b, xiaohongshuAPP as c, changeBotID as d, douyinPush as f, setdyPush as g, setbiliPush as h, bilibiliAPP as i, init_root as k, bilibiliPush as l, forcePush as m, kkkUpdateCommand as n, kuaishouAPP as o, douyinPushList as p, update as r, prefix as s, kkkUpdate as t, bilibiliPushList as u, help as v, setdyck as w, dylogin as x, version as y };
|
|
@@ -30,6 +30,5 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
30
30
|
value: mod,
|
|
31
31
|
enumerable: true
|
|
32
32
|
}) : target, mod));
|
|
33
|
-
var __toCommonJS = (mod) => __hasOwnProp.call(mod, "module.exports") ? mod["module.exports"] : __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
34
33
|
var __require = createRequire(import.meta.url);
|
|
35
|
-
export {
|
|
34
|
+
export { __toESM as a, __require as i, __esmMin as n, __export as r, __commonJSMin as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { $ as
|
|
1
|
+
import { a as __toESM, n as __esmMin, r as __export } from "./rolldown-runtime-FWYmKKAj.js";
|
|
2
|
+
import { $ as RefreshCw, At as Bell, B as Zap, C as zhCN, Ct as CircleFadingArrowUp, Dt as Bot, E as init_date_fns, Et as Calendar, F as HeroUIProvider, G as TrendingUp, H as User, I as require_jsx_runtime, J as Star, K as ThumbsUp, L as IoSearch, M as code_default, Mt as init_clsx, N as chip_default, Nt as require_server_node, O as formatDistanceToNow, Ot as Bookmark, P as button_default, Pt as require_react, Q as Send, R as init_io5, S as init_locale, St as CircleQuestionMark, T as init_lu, Tt as CircleAlert, U as UserPlus, V as Users, W as TriangleAlert, X as Shield, Y as Sparkles, Z as Share2, Zt as Chalk, _ as FaCommentDots, _t as Crown, at as Music, b as AiFillStar, bt as Code, c as rehypeHighlight, ct as LogIn, d as MdAccessTime, dt as Info, et as Radio, f as init_md, ft as Heart, g as FaCodeBranch, gt as ExternalLink, h as FaBug, ht as Eye, it as Play, j as init_dist, jt as clsx_default, k as format$1, kt as BookOpen, l as init_react_markdown, lt as List, m as init_ri, mt as FileText, nt as Power, o as init_chalk, ot as MessageCircle, p as RiShareForwardFill, pt as Hash, q as Terminal, rt as Plug2, s as init_rehype_highlight, st as MapPin, tt as QrCode, u as Markdown, ut as Link, v as init_fa6, vt as CornerDownLeft, w as LuFullscreen, wt as CircleCheckBig, x as init_ai, xt as Clock, y as AiFillHeart, yt as Coins, z as init_lucide_react } from "./vendor-DoVeMvEg.js";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import fs from "node:fs";
|
|
5
5
|
import { fileURLToPath } from "node:url";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import "./vendor-
|
|
2
|
-
import { r as reactServerRender, t as template_default } from "./template-
|
|
1
|
+
import "./vendor-DoVeMvEg.js";
|
|
2
|
+
import { r as reactServerRender, t as template_default } from "./template-UGmQ7vUV.js";
|
|
3
3
|
export { template_default as default, reactServerRender };
|