1
0
mirror of https://github.com/6dylan6/jdpro.git synced 2026-04-20 19:23:09 +08:00

Compare commits

..

3 Commits

Author SHA1 Message Date
2024 968d5bb179 1 2025-04-01 00:26:41 +08:00
2024 0f3965dc13 1 2025-03-31 21:29:29 +08:00
2024 23b21979e1 1 2025-03-31 21:25:57 +08:00
8 changed files with 22 additions and 20 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_COOKIE,值:抓的CK(要安全就手抓),多个每行建一个,不要全写在一个;
4、订阅运行完毕,到定时任务搜索依赖安装(jd_indeps.sh)任务执行,步骤2未完成会拉不到该任务;
4、到环境变量,创建变量,名称: JD_COOKIE,值:抓的CK(要安全就手抓),多个每行建一个,不要写在一个里;
5、配置通知,通知的key填写到配置管理config.sh文件; 5、配置通知,通知的key填写到配置管理config.sh文件;
@@ -78,12 +74,8 @@ export NOTIFY_SHOWNAMETYPE="4" 效果是 : 账号名称:备注
4、青龙系统通知(新增删除任务、登录等通知),需把通知变量写到config.sh文件,在环境变量里只发脚本运行通知哈。 4、青龙系统通知(新增删除任务、登录等通知),需把通知变量写到config.sh文件,在环境变量里只发脚本运行通知哈。
5、建议调整任务运行超时时间,青龙默认1小时有些跑不完就被强制结束,config.sh里配置。CommandTimeoutTime="3h" 即改为3小时,根据自己ck数量调整。 5、建议调整任务运行超时时间,青龙默认1小时有些跑不完就被强制结束,config.sh里配置。CommandTimeoutTime="3h" 即改为3小时,根据自己ck数量调整。
</code></pre>
</details>
6、如需禁止某些CK参加所有活动或某些活动功能,实现重组CK顺序功能,包括随机、优先、轮换、组队、分段等功能,把[task_before](./docker/task_before.sh)文件内容复制到配置管理task_before.sh保存
如需禁止某些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个 Recombin_CK_Mode="3" Recombin_CK_ARG1="5" Recombin_CK_ARG2="5" 假设有100个CK,希望前5个账号始终保持在前部,剩余95个账号按照轮换模式每天轮换5个
其他用法具体参考[文档](https://docs.qq.com/doc/DTXh6QUVjRXJ1TFdN) 其他用法具体参考[文档](https://docs.qq.com/doc/DTXh6QUVjRXJ1TFdN)
</code></pre>
</details>
## 通用环境变量(到配置管理-config.sh里添加变量,export xxx='xxx'格式) ## 通用环境变量(到配置管理-config.sh里添加变量,export xxx='xxx'格式)
+1 -1
View File
@@ -30,7 +30,7 @@ function getLatestFile(files) {
async function getToken() { async function getToken() {
const authConfig = await readFile(authFile); const authConfig = await readFile(authFile);
// console.log(authConfig.toString().match(/"token":"(.*?)",/)[1]) // console.log(authConfig.toString().match(/"token":"(.*?)",/)[1])
return authConfig.toString().match(/"token":"(.*?)",/)[1]; return authConfig.toString().match(/"token":"([^"]*)"(?!.*"token":)/)[1];
} }
// getToken() // getToken()
module.exports.getEnvs = async () => { module.exports.getEnvs = async () => {
File diff suppressed because one or more lines are too long
+7
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -180,7 +180,7 @@ def get_token() -> str or None:
if 'keyv' in path: if 'keyv' in path:
with open(path, "r", encoding="latin1") as file: with open(path, "r", encoding="latin1") as file:
auth = file.read() auth = file.read()
matches = re.search(r'token":"([^"]+)"', auth) matches = re.search(r'"token":"([^"]*)"(?!.*"token":)', auth)
token = matches.group(1) token = matches.group(1)
else: else:
with open(path, "r") as file: with open(path, "r") as file:
+1 -1
View File
@@ -493,7 +493,7 @@ def main():
if 'keyv' in config: if 'keyv' in config:
with open(config, "r", encoding="latin1") as file: with open(config, "r", encoding="latin1") as file:
auth = file.read() auth = file.read()
matches = re.search(r'token":"([^"]+)"', auth) matches = re.search(r'"token":"([^"]*)"(?!.*"token":)', auth)
token = matches.group(1) token = matches.group(1)
else: else:
with open(config, "r") as file: with open(config, "r") as file:
+1 -1
View File
@@ -251,7 +251,7 @@ def ql_login() -> str: # 方法 青龙登录(获取Token 功能同上)
if 'keyv' in path: if 'keyv' in path:
with open(path, "r", encoding="latin1") as file: with open(path, "r", encoding="latin1") as file:
auth = file.read() auth = file.read()
matches = re.search(r'token":"([^"]+)"', auth) matches = re.search(r'"token":"([^"]*)"(?!.*"token":)', auth)
token = matches.group(1) token = matches.group(1)
else: else:
with open(path, "r") as file: with open(path, "r") as file:
+1 -1
View File
@@ -2151,7 +2151,7 @@ function getLatestFile(files) {
async function getToken() { async function getToken() {
const authConfig = await fs.readFileSync(authFile); const authConfig = await fs.readFileSync(authFile);
// console.log(authConfig.toString().match(/"token":"(.*?)",/)[1]) // console.log(authConfig.toString().match(/"token":"(.*?)",/)[1])
return authConfig.toString().match(/"token":"(.*?)",/)[1]; return authConfig.toString().match(/"token":"([^"]*)"(?!.*"token":)/)[1];
} }
// getToken() // getToken()