karin-plugin-kkk 2.15.1 → 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 +14 -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 +3 -3
- package/lib/build-metadata.json +5 -5
- package/lib/core_chunk/{main-B88vuAg3.js → main-14od0VyY.js} +68 -64
- 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-CElmvm1y.js → Combination-BHJal5hU.js} +1 -1
- package/lib/web_chunk/assets/{avatar-DdKKK8fN.js → avatar-Bk-l0vwp.js} +1 -1
- package/lib/web_chunk/assets/core-BktEBjVB.js +1 -0
- package/lib/web_chunk/assets/{eye-DscQBlfD.js → eye-DKV8219y.js} +1 -1
- package/lib/web_chunk/assets/{index-CVeWpiod.js → index-CrQKpnky.js} +2 -2
- package/lib/web_chunk/assets/{jszip.min-IdIeQO8w.js → jszip.min-CRbx4NQr.js} +1 -1
- package/lib/web_chunk/assets/{page-BZ-DxMJp.js → page-3eH1NE5B.js} +1 -1
- package/lib/web_chunk/assets/{page-jMAgww3l.js → page-CXeTxMT1.js} +2 -2
- package/lib/web_chunk/assets/{page-CvLBFVUj.js → page-Cd6drSuq.js} +1 -1
- package/lib/web_chunk/assets/{page-B3Z9ZoZE.js → page-D5DkJUyl.js} +1 -1
- package/lib/web_chunk/assets/{page-Ds7pyOc_.js → page-DVOFQ8PQ.js} +4 -4
- package/lib/web_chunk/assets/{parsers-DslAp9xq.js → parsers-DG8cIK4g.js} +1 -1
- package/lib/web_chunk/assets/{request-BrzrZK5Z.js → request-DTUmEUrr.js} +1 -1
- package/lib/web_chunk/assets/{select-B9ErW2-J.js → select-DLWN_-Ck.js} +1 -1
- package/lib/web_chunk/assets/{separator-BqVV7haD.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/web_chunk/assets/core-CdUvdXfI.js +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,20 @@
|
|
|
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
|
+
|
|
5
19
|
## [2.15.1](https://github.com/ikenxuan/karin-plugin-kkk/compare/v2.15.0...v2.15.1) (2025-12-02)
|
|
6
20
|
|
|
7
21
|
|
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 setbilick, S as removeAllFiles, T as task, b as biLogin, w as setdyck, x as dylogin } from "../core_chunk/main-
|
|
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 { v as help, y as version } from "../core_chunk/main-
|
|
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 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-
|
|
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 douyinAPP, c as xiaohongshuAPP, i as bilibiliAPP, o as kuaishouAPP, s as prefix } from "../core_chunk/main-
|
|
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 { n as kkkUpdateCommand, r as update, t as kkkUpdate } from "../core_chunk/main-
|
|
3
|
-
import "../core_chunk/template-
|
|
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
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) {
|
|
@@ -8903,54 +8953,8 @@ const getChangelogImage = async (props) => {
|
|
|
8903
8953
|
buildTime
|
|
8904
8954
|
}) || null;
|
|
8905
8955
|
};
|
|
8906
|
-
const isSemverGreater = (remote, local) => {
|
|
8907
|
-
const parse = (v) => {
|
|
8908
|
-
v = v.trim();
|
|
8909
|
-
if (v.startsWith("v") || v.startsWith("V")) v = v.slice(1);
|
|
8910
|
-
const [preBuild] = v.split("+", 2);
|
|
8911
|
-
const [core, pre] = preBuild.split("-", 2);
|
|
8912
|
-
const parts = core.split(".");
|
|
8913
|
-
return {
|
|
8914
|
-
major: parseInt(parts[0] || "0", 10) || 0,
|
|
8915
|
-
minor: parseInt(parts[1] || "0", 10) || 0,
|
|
8916
|
-
patch: parseInt(parts[2] || "0", 10) || 0,
|
|
8917
|
-
prerelease: pre ? pre.split(".") : []
|
|
8918
|
-
};
|
|
8919
|
-
};
|
|
8920
|
-
const cmpId = (a, b) => {
|
|
8921
|
-
const an = /^\d+$/.test(a);
|
|
8922
|
-
const bn = /^\d+$/.test(b);
|
|
8923
|
-
if (an && bn) {
|
|
8924
|
-
const na = parseInt(a, 10);
|
|
8925
|
-
const nb = parseInt(b, 10);
|
|
8926
|
-
if (na === nb) return 0;
|
|
8927
|
-
return na > nb ? 1 : -1;
|
|
8928
|
-
}
|
|
8929
|
-
if (an && !bn) return -1;
|
|
8930
|
-
if (!an && bn) return 1;
|
|
8931
|
-
if (a === b) return 0;
|
|
8932
|
-
return a > b ? 1 : -1;
|
|
8933
|
-
};
|
|
8934
|
-
const r = parse(remote);
|
|
8935
|
-
const l = parse(local);
|
|
8936
|
-
if (r.major !== l.major) return r.major > l.major;
|
|
8937
|
-
if (r.minor !== l.minor) return r.minor > l.minor;
|
|
8938
|
-
if (r.patch !== l.patch) return r.patch > l.patch;
|
|
8939
|
-
const ra = r.prerelease;
|
|
8940
|
-
const la = l.prerelease;
|
|
8941
|
-
if (ra.length === 0 && la.length === 0) return false;
|
|
8942
|
-
if (ra.length === 0 && la.length > 0) return true;
|
|
8943
|
-
if (ra.length > 0 && la.length === 0) return false;
|
|
8944
|
-
const len = Math.min(ra.length, la.length);
|
|
8945
|
-
for (const [i, raItem] of ra.entries()) {
|
|
8946
|
-
if (i >= len) break;
|
|
8947
|
-
const c = cmpId(raItem, la[i]);
|
|
8948
|
-
if (c !== 0) return c > 0;
|
|
8949
|
-
}
|
|
8950
|
-
if (ra.length !== la.length) return ra.length > la.length;
|
|
8951
|
-
return false;
|
|
8952
|
-
};
|
|
8953
8956
|
await init_module();
|
|
8957
|
+
await init_semver();
|
|
8954
8958
|
var UPDATE_LOCK_KEY = "kkk:update:lock";
|
|
8955
8959
|
var UPDATE_MSGID_KEY = "kkk:update:msgId";
|
|
8956
8960
|
var Handler = async (e) => {
|
|
@@ -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 };
|