1
0
mirror of https://github.com/6dylan6/jdpro.git synced 2026-05-07 22:43:06 +08:00
This commit is contained in:
2024
2025-03-31 21:25:57 +08:00
parent 89ef790a16
commit 23b21979e1
6 changed files with 14 additions and 19 deletions
+8 -13
View File
@@ -28,17 +28,13 @@ ql repo https://github.com/6dylan6/jdpro.git "jd_|jx_|jddj_" "backUp" "^jd[^_]|U
## 简要流程
1、部署青龙并登陆。
1、部署青龙并登陆,版本不用追新,稳定才好,推荐whyour/qinglong:2.17.9镜像部署
2、到配置管理config.sh修改,差不多在17行(特别注意,没有修改此配置,sh类型任务拉不下来);
2、到订阅管理创建订阅并运行;正确配置[参考](https://github.com/6dylan6/jdpro/issues/22)
RepoFileExtensions="js py"修改为 RepoFileExtensions="js py sh" 保存
3、订阅执行完,到定时任务搜索依赖安装(jd_indeps.sh)任务执行
3、到订阅管理创建订阅并运行;正确配置[参考](https://github.com/6dylan6/jdpro/issues/22)
4、订阅运行完毕,到定时任务搜索依赖安装(jd_indeps.sh)任务执行,步骤2未完成会拉不到该任务;
4、到环境变量,创建变量,名称: JD_COOKIE,值:抓的CK(要安全就手抓),多个每行建一个,不要写在一个里;
4、到环境变量,创建变量,名称: JD_COOKIE,值:抓的CK(要安全就手抓),多个每行建一个,不要全写在一个;
5、配置通知,通知的key填写到配置管理config.sh文件;
@@ -78,12 +74,8 @@ export NOTIFY_SHOWNAMETYPE="4" 效果是 : 账号名称:备注
4、青龙系统通知(新增删除任务、登录等通知),需把通知变量写到config.sh文件,在环境变量里只发脚本运行通知哈。
5、建议调整任务运行超时时间,青龙默认1小时有些跑不完就被强制结束,config.sh里配置。CommandTimeoutTime="3h" 即改为3小时,根据自己ck数量调整。
</code></pre>
</details>
如需禁止某些CK参加所有活动或某些活动功能,实现重组CK顺序功能,包括随机、优先、轮换、组队、分段等功能,把[task_before](./docker/task_before.sh)文件内容复制到配置管理task_before.sh保存
6、如需禁止某些CK参加所有活动或某些活动功能,实现重组CK顺序功能,包括随机、优先、轮换、组队、分段等功能,把[task_before](./docker/task_before.sh)文件内容复制到配置管理task_before.sh保存
常用变量举例:
@@ -94,6 +86,9 @@ Recombin_CK_Mode="2" Recombin_CK_ARG1="15" 假设有100个CK,前15个CK按正
Recombin_CK_Mode="3" Recombin_CK_ARG1="5" Recombin_CK_ARG2="5" 假设有100个CK,希望前5个账号始终保持在前部,剩余95个账号按照轮换模式每天轮换5个
其他用法具体参考[文档](https://docs.qq.com/doc/DTXh6QUVjRXJ1TFdN)
</code></pre>
</details>
## 通用环境变量(到配置管理-config.sh里添加变量,export xxx='xxx'格式)
+1 -1
View File
@@ -30,7 +30,7 @@ function getLatestFile(files) {
async function getToken() {
const authConfig = await readFile(authFile);
// console.log(authConfig.toString().match(/"token":"(.*?)",/)[1])
return authConfig.toString().match(/"token":"(.*?)",/)[1];
return authConfig.toString().match(/"token":"([^"]*)"(?!.*"token":)/)[1];
}
// getToken()
module.exports.getEnvs = async () => {
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -493,7 +493,7 @@ def main():
if 'keyv' in config:
with open(config, "r", encoding="latin1") as file:
auth = file.read()
matches = re.search(r'token":"([^"]+)"', auth)
matches = re.search(r'"token":"([^"]*)"(?!.*"token":)', auth)
token = matches.group(1)
else:
with open(config, "r") as file:
+1 -1
View File
@@ -251,7 +251,7 @@ def ql_login() -> str: # 方法 青龙登录(获取Token 功能同上)
if 'keyv' in path:
with open(path, "r", encoding="latin1") as file:
auth = file.read()
matches = re.search(r'token":"([^"]+)"', auth)
matches = re.search(r'"token":"([^"]*)"(?!.*"token":)', auth)
token = matches.group(1)
else:
with open(path, "r") as file:
+1 -1
View File
@@ -2151,7 +2151,7 @@ function getLatestFile(files) {
async function getToken() {
const authConfig = await fs.readFileSync(authFile);
// console.log(authConfig.toString().match(/"token":"(.*?)",/)[1])
return authConfig.toString().match(/"token":"(.*?)",/)[1];
return authConfig.toString().match(/"token":"([^"]*)"(?!.*"token":)/)[1];
}
// getToken()