Compare commits

...

3 Commits

Author SHA1 Message Date
可达鸭
d91d23bfcb Update jd_task_farmNew.js 2025-03-18 18:29:18 +08:00
可达鸭
6f964a1ccc Update README.md 2025-03-18 18:28:13 +08:00
可达鸭
46901224d2 Update message.js 2025-03-18 13:03:13 +08:00
3 changed files with 63 additions and 30 deletions

View File

@ -35,12 +35,17 @@
> 选择redis缓存,请正确填写`host,port,password,db`选项
3. 安装项目依赖
4. > 打开Bug龙终端: docker exec -it qinglong bash
> 打开Bug龙终端: docker exec -it qinglong bash
```bash
cd /ql/data/scripts/qitoqito_psyduck/
npm install
```
5. 将Bug龙订阅的执行后改为
4. 安装LibreSSL
```bash
cd /ql/data/scripts/qitoqito_psyduck/sh && chmod +x libressl.sh && ./libressl.sh && node ./libressl.js
```
> 安装完成,在config.ini添加curlPath=/opt/psyduck/curl/bin/psyduck-curl
4. 将Bug龙订阅的执行后改为
```
cp -a /ql/data/repo/qitoqito_psyduck/. /ql/data/scripts/qitoqito_psyduck && task qitoqito_psyduck/qlCreate.js now
```
@ -58,7 +63,7 @@ jdSign=http://ip:17840/sign
### 2. Redis 服务配置
```bash
# 部署 Redis 服务
docker run -itd --name redis -p 6379:6379 redis --requirepass 你的密码
docker run -itd --name redis -p 6379:6379 --restart=always redis --requirepass 你的密码
# 配置文件修改
host= # Redis地址,只需ip地址
@ -203,6 +208,8 @@ proxy= # 代理ip
3. 推送失败
- 验证通知配置
- 检查网络连接
4. 活动火爆
- Docker容器网络选择host
- 安装libressl

View File

@ -19,7 +19,7 @@ export class Main extends Template {
referer: 'https://h5.m.jd.com/pb/015686010/Bc9WX7MpCW7nW9QjZ5N3fFeJXMH/index.html'
},
tempExpire: 86400000,
readme: `如要使用自定义助力码,请在框架目录/inviter创建jd_task_plantBean.json,按需修改[{"user":"a","inviteCode":"abc"},{"user":"b","inviteCode":"efg"}]`,
readme: `如要使用自定义助力码,请在框架目录/inviter创建jd_task_farmNew.json,按需修改[{"user":"a","inviteCode":"abc"},{"user":"b","inviteCode":"efg"}]`,
turn: 4,
crontab: 3,
interval: 1000,

View File

@ -5,34 +5,38 @@ export class Message {
this.func = process.psyDuck
this.msg = this.func.message
this.title = `🐽 消息提醒: ${this.func.profile.title}`
message.push([`PsyDuck [https://github.com/qitoqito/psyduck]`])
this.message = message.map(d => d.join("\n"))
this.msgAry = message.map(d => d.join("\n"))
}
async send(msgAry) {
if (this.msg.hasOwnProperty('TELEGRAM_TOKEN')) {
await this.tgNotify()
}
if (this.msg.hasOwnProperty('BARK_TOKEN')) {
await this.barkNotify()
}
if (this.msg.hasOwnProperty('PUSHPLUS_TOKEN')) {
await this.ppNotify()
}
if (this.msg.hasOwnProperty('FTQQ_TOKEN')) {
await this.ftqqNotify()
}
if (this.msg.hasOwnProperty('DINGTALK_TOKEN')) {
await this.ddNotify()
}
if (this.msg.hasOwnProperty('IGOT_TOKEN')) {
await this.igotNotify()
}
if (this.msg.hasOwnProperty('WEIXIN_TOKEN')) {
await this.wechatNotify()
}
if (this.msg.hasOwnProperty('WXAM_TOKEN')) {
await this.wxamNotify()
const result = this.splitArrays(this.msgAry);
for (let message of result) {
message.push([`PsyDuck [https://github.com/qitoqito/psyduck]`])
this.message = message
if (this.msg.hasOwnProperty('TELEGRAM_TOKEN')) {
await this.tgNotify()
}
if (this.msg.hasOwnProperty('BARK_TOKEN')) {
await this.barkNotify()
}
if (this.msg.hasOwnProperty('PUSHPLUS_TOKEN')) {
await this.ppNotify()
}
if (this.msg.hasOwnProperty('FTQQ_TOKEN')) {
await this.ftqqNotify()
}
if (this.msg.hasOwnProperty('DINGTALK_TOKEN')) {
await this.ddNotify()
}
if (this.msg.hasOwnProperty('IGOT_TOKEN')) {
await this.igotNotify()
}
if (this.msg.hasOwnProperty('WEIXIN_TOKEN')) {
await this.wechatNotify()
}
if (this.msg.hasOwnProperty('WXAM_TOKEN')) {
await this.wxamNotify()
}
}
}
@ -320,4 +324,26 @@ export class Message {
console.log('[Message] Telegram 发送通知消息失败')
}
}
splitArrays(arr, maxLength = 200) {
const result = [];
let currentArray = [];
let currentLength = 0;
for (const subArray of arr) {
const subLength = subArray.split("\n").length;
if (currentLength + subLength<=maxLength) {
currentArray.push(subArray);
currentLength += subLength;
}
else {
result.push(currentArray);
currentArray = [subArray];
currentLength = subLength;
}
}
if (currentArray.length>0) {
result.push(currentArray);
}
return result;
}
}