1
0
mirror of https://github.com/6dylan6/jdpro.git synced 2025-07-15 17:12:54 +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

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'格式)

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

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:

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:

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()