1
0
mirror of https://github.com/6dylan6/jdpro.git synced 2026-05-06 21:53:07 +08:00

Compare commits

..

245 Commits

Author SHA1 Message Date
dylan cded721db9 1 2023-08-22 11:34:05 +08:00
dylan e7bd5e2ccc 1 2023-08-22 11:28:21 +08:00
dylan c6765f11b2 1 2023-08-21 22:20:16 +08:00
dylan d6ef4356cb 1 2023-08-21 19:42:27 +08:00
dylan 8f3f5c2a23 1 2023-08-21 19:21:03 +08:00
dylan 2a41a9631e 1 2023-08-21 10:24:24 +08:00
dylan 87f52c7b99 1 2023-08-20 22:59:53 +08:00
dylan f054570913 1 2023-08-20 17:11:20 +08:00
dylan 3f7143361b 1 2023-08-20 17:00:26 +08:00
dylan 72501bf6f4 1 2023-08-20 11:08:24 +08:00
dylan 0f5725bc0a 1 2023-08-20 09:26:02 +08:00
dylan a1219db2f7 1 2023-08-19 22:23:34 +08:00
dylan fe6cdd0d18 1 2023-08-19 20:16:26 +08:00
dylan 2835de5174 1 2023-08-19 20:05:07 +08:00
dylan 3ca833563e 1 2023-08-19 19:57:05 +08:00
dylan 915cad2aff 1 2023-08-19 19:54:17 +08:00
dylan 1004b3625c 1 2023-08-18 08:46:11 +08:00
dylan 365af770a4 1 2023-08-17 21:47:21 +08:00
dylan 4995e37e55 1 2023-08-17 21:46:26 +08:00
dylan bc8e8a55fe 1 2023-08-17 21:35:00 +08:00
dylan fab8278277 1 2023-08-17 21:24:04 +08:00
dylan 458dffde05 1 2023-08-17 21:19:35 +08:00
dylan fbcc51b768 1 2023-08-17 12:32:45 +08:00
dylan b9695345b4 1 2023-08-17 07:37:33 +08:00
dylan 39d94b05b8 1 2023-08-17 07:33:14 +08:00
dylan 8f009fe443 1 2023-08-16 22:54:24 +08:00
dylan f99c02c54c 1 2023-08-16 22:52:00 +08:00
dylan 34d91ff46e 1 2023-08-16 20:50:36 +08:00
dylan 975c512a34 1 2023-08-16 00:54:40 +08:00
dylan 214466950a 1 2023-08-16 00:54:23 +08:00
dylan 1ddbb23977 1 2023-08-15 07:20:59 +08:00
dylan 548b0a1603 1 2023-08-15 07:19:39 +08:00
dylan f4409d7bf4 1 2023-08-14 19:35:20 +08:00
dylan 3c6d5efe4e 1 2023-08-14 19:33:00 +08:00
dylan da32fd9142 1 2023-08-14 13:23:34 +08:00
dylan de3e8b15b5 1 2023-08-14 13:13:37 +08:00
dylan 8fe2fbb673 1 2023-08-14 00:24:38 +08:00
dylan d0248b69c1 1 2023-08-14 00:07:08 +08:00
dylan 4016709135 1 2023-08-13 22:35:34 +08:00
dylan 753b138f90 1 2023-08-13 21:41:43 +08:00
dylan 94caa2d95c 1 2023-08-13 21:34:06 +08:00
dylan e70fa19e1b 1 2023-08-12 11:00:34 +08:00
dylan 6f3e2d598d 1 2023-08-12 09:14:18 +08:00
dylan c2b400a5b5 1 2023-08-11 21:48:22 +08:00
dylan 864ff4d328 1 2023-08-11 07:24:50 +08:00
dylan e0a354d61a 1 2023-08-10 21:57:23 +08:00
dylan 6b02e69f1e 1 2023-08-10 00:35:50 +08:00
dylan 736950d10b 1 2023-08-09 07:15:16 +08:00
dylan 4989503cec 1 2023-08-08 22:46:45 +08:00
dylan a42d35e53a 1 2023-08-08 00:28:47 +08:00
dylan d84378e2d3 1 2023-08-06 22:17:41 +08:00
dylan e7f46e0af2 1 2023-08-06 15:53:54 +08:00
dylan efdd432c06 1 2023-08-05 09:59:15 +08:00
dylan 070d9f09d8 1 2023-08-05 09:01:12 +08:00
dylan e53a7e9272 1 2023-08-04 08:40:16 +08:00
dylan 15bce53baa 1 2023-08-03 20:38:04 +08:00
dylan 68c1f15543 1 2023-08-03 19:24:52 +08:00
dylan 6eb2499043 1 2023-08-03 08:36:02 +08:00
dylan fa219fe2b8 1 2023-08-02 17:11:19 +08:00
dylan 22c6831ace 1 2023-08-01 20:11:43 +08:00
dylan 81159bf03c 1 2023-08-01 07:30:45 +08:00
dylan a8e8f9889d 1 2023-08-01 00:47:05 +08:00
dylan 956802a2fc 1 2023-07-31 12:30:13 +08:00
dylan bc40b48bdf 1 2023-07-31 07:26:29 +08:00
dylan 4ba264991c 1 2023-07-30 11:36:18 +08:00
dylan 8e612f2181 1 2023-07-29 18:34:17 +08:00
dylan d378fd7220 1 2023-07-29 17:32:53 +08:00
dylan e58ec30550 1 2023-07-29 17:27:22 +08:00
dylan 0fbf4fa736 1 2023-07-29 17:20:21 +08:00
dylan 6a10185c6f 1 2023-07-29 16:02:20 +08:00
dylan 14d1f58497 1 2023-07-29 15:57:19 +08:00
dylan ae4a07b377 1 2023-07-29 15:43:38 +08:00
dylan 0ce6051748 1 2023-07-29 10:05:41 +08:00
dylan dc3de31508 1 2023-07-28 08:53:27 +08:00
dylan e68c7d5606 1 2023-07-27 17:20:10 +08:00
dylan 97038a2422 1 2023-07-27 13:43:05 +08:00
dylan 765aadf825 1 2023-07-27 12:54:56 +08:00
dylan a0ebcb9168 1 2023-07-27 09:59:11 +08:00
dylan 5fc0353d74 1 2023-07-26 23:39:19 +08:00
dylan ea3b69776a 1 2023-07-26 23:37:34 +08:00
dylan 31a1a722d9 1 2023-07-25 13:14:30 +08:00
dylan 8cd1160e4b 1 2023-07-25 11:52:38 +08:00
dylan f2eb114965 1 2023-07-25 10:01:03 +08:00
dylan 9aad3da449 1 2023-07-25 07:03:32 +08:00
dylan 3262fc2638 1 2023-07-25 07:02:54 +08:00
dylan 1c38faadde 1 2023-07-24 20:20:32 +08:00
dylan c6b11c77df 1 2023-07-24 20:08:13 +08:00
dylan 45c8a72051 1 2023-07-24 15:05:31 +08:00
dylan f97e7ea925 1 2023-07-24 12:27:17 +08:00
dylan 24a2d500bb 1 2023-07-23 22:59:14 +08:00
dylan d9c8471194 1 2023-07-23 17:07:06 +08:00
dylan 70ecc2da25 1 2023-07-23 16:52:38 +08:00
dylan 450371d444 1 2023-07-22 19:50:03 +08:00
dylan 45cfd6cb04 1 2023-07-22 17:02:24 +08:00
dylan 184879a0cc 1 2023-07-21 19:36:11 +08:00
dylan 1099ea72e0 1 2023-07-20 13:55:38 +08:00
dylan f0782d2a9a 1 2023-07-20 13:31:49 +08:00
dylan 632cb7a0c0 1 2023-07-20 12:37:05 +08:00
dylan 64f6873c3f 1 2023-07-19 08:06:49 +08:00
dylan 19dddfe478 1 2023-07-15 22:47:34 +08:00
dylan 580f9dc85f 1 2023-07-14 06:42:31 +08:00
dylan a1699d19db 1 2023-07-13 22:50:05 +08:00
dylan 77885ef903 1 2023-07-13 07:14:25 +08:00
dylan 74f8143fdb 1 2023-07-12 20:16:28 +08:00
dylan 6d9f419d4d 1 2023-07-11 21:55:20 +08:00
dylan f12299e8ba 1 2023-07-11 21:49:47 +08:00
dylan 043e92703e 1 2023-07-11 19:42:19 +08:00
dylan ba6e590081 1 2023-07-10 19:09:24 +08:00
dylan b405ee19c6 1 2023-07-09 12:51:03 +08:00
dylan 0a0a78feab 1 2023-07-09 10:45:34 +08:00
dylan 4e57fa9dcc 1 2023-07-08 21:09:39 +08:00
dylan c9f48714e8 1 2023-07-08 19:43:51 +08:00
dylan 5876a8d75f 1 2023-07-07 12:55:11 +08:00
dylan 49579e6c98 1 2023-07-06 19:32:58 +08:00
dylan c3ad8b9f17 1 2023-07-05 20:45:16 +08:00
dylan 3e6d3c3d8e 1 2023-07-05 20:10:57 +08:00
dylan 747553285b 1 2023-07-04 20:39:46 +08:00
dylan 0cb8223dc1 1 2023-07-04 19:33:54 +08:00
dylan 2fd7d870e5 1 2023-07-04 19:24:47 +08:00
dylan 9ff979465e 1 2023-07-03 21:33:21 +08:00
dylan b2c669109b 1 2023-07-03 13:10:42 +08:00
dylan df82461e50 1 2023-07-01 22:36:59 +08:00
dylan c4228cf781 1 2023-07-01 12:40:24 +08:00
dylan 4933c39a27 1 2023-07-01 09:40:14 +08:00
dylan fd2bfba8e7 1 2023-07-01 09:37:17 +08:00
dylan 3ffd566b84 1 2023-06-30 07:05:15 +08:00
dylan 4bd360cf55 1 2023-06-28 22:41:04 +08:00
dylan a9f87db7c3 1 2023-06-28 22:40:02 +08:00
dylan 084f51f308 1 2023-06-28 22:10:11 +08:00
dylan 14b704765c 1 2023-06-27 07:27:19 +08:00
dylan 7eb3d4b48a 1 2023-06-26 22:06:36 +08:00
dylan 1a236875a1 1 2023-06-26 19:42:21 +08:00
dylan 20f8946277 1 2023-06-25 19:45:30 +08:00
dylan 255f525544 1 2023-06-25 07:16:34 +08:00
dylan 6d4c3e5bba 1 2023-06-23 16:43:55 +08:00
dylan b21e1e39e7 1 2023-06-23 16:43:24 +08:00
dylan 06dd221784 1 2023-06-23 16:26:00 +08:00
dylan bcd2e60558 1 2023-06-23 16:12:53 +08:00
dylan 5b0842125b 1 2023-06-23 16:10:55 +08:00
dylan 7ccc83b20d 1 2023-06-23 16:09:14 +08:00
dylan 7a5452906c 1 2023-06-23 09:16:21 +08:00
dylan f453d24931 1 2023-06-23 09:00:18 +08:00
dylan 5c562aa3ee 1 2023-06-22 12:57:39 +08:00
dylan 182fcc2c99 1 2023-06-22 09:45:44 +08:00
dylan de2fa605cb 1 2023-06-21 19:39:48 +08:00
dylan e02a54c6d6 1 2023-06-21 08:55:35 +08:00
dylan 69c3b9aa8c 1 2023-06-21 08:52:42 +08:00
dylan 733ceebc0c 1 2023-06-20 19:34:56 +08:00
dylan 8caa5e744e 1 2023-06-20 08:41:03 +08:00
dylan 880b882fd1 1 2023-06-20 08:35:10 +08:00
dylan 0e22810b4d 1 2023-06-19 20:42:50 +08:00
dylan 6d91d8c0a6 1 2023-06-19 07:22:16 +08:00
dylan 452790f5b3 1 2023-06-18 19:37:19 +08:00
dylan 7fe3e86e75 1 2023-06-18 16:53:15 +08:00
dylan 00c56331b7 1 2023-06-18 13:55:20 +08:00
dylan b9622b2274 1 2023-06-18 11:23:45 +08:00
6dylan6 279da4b97d Merge pull request #33 from milletbig/main
Update sendNotify.js
2023-06-17 21:20:33 +08:00
milletbig dc0d809126 Merge branch '6dylan6:main' into main 2023-06-17 16:52:35 +08:00
milletbig 2daeab8fae Update sendNotify.js
上次pr只修改了一个文件,后来发现还有一个地方需要修改。
2023-06-17 16:47:59 +08:00
dylan 01783709db 1 2023-06-17 00:19:56 +08:00
dylan 8f8d84161a 1 2023-06-16 23:10:44 +08:00
dylan 3063f0e4fc 1 2023-06-16 19:14:06 +08:00
dylan df99d186de 1 2023-06-16 13:48:23 +08:00
dylan 4afbaeae14 1 2023-06-16 13:36:06 +08:00
6dylan6 0590371770 Merge pull request #30 from milletbig/main
Update sendNotify.js
2023-06-15 20:13:55 +08:00
dylan a7a00b6170 1 2023-06-15 19:19:15 +08:00
dylan 57c9b61b10 1 2023-06-15 12:52:41 +08:00
dylan 95edff49ce 1 2023-06-15 12:31:02 +08:00
dylan 37f0f3cc30 1 2023-06-15 08:43:15 +08:00
dylan f72a840bf3 1 2023-06-14 21:35:31 +08:00
dylan 979e275b25 1 2023-06-14 21:33:02 +08:00
milletbig fd5232ac2f Merge branch '6dylan6:main' into main 2023-06-13 20:57:02 +08:00
dylan c020f24112 1 2023-06-13 20:47:21 +08:00
milletbig 602551691b Update sendNotify.js
修正pushdeer推送通道中markdown格式问题
2023-06-13 20:44:04 +08:00
dylan 65239137f5 1 2023-06-12 15:43:27 +08:00
dylan 05132782dd 1 2023-06-12 13:05:49 +08:00
dylan ed6530ff3b 1 2023-06-12 08:45:54 +08:00
dylan 29169f0525 1 2023-06-12 07:15:58 +08:00
dylan 7e3de659b2 1 2023-06-12 00:49:33 +08:00
dylan 8819c1ff25 1 2023-06-12 00:24:38 +08:00
dylan 3fafd9d428 1 2023-06-12 00:12:00 +08:00
dylan 250081bac6 1 2023-06-11 21:25:53 +08:00
dylan cae8072539 1 2023-06-11 14:16:32 +08:00
dylan ebcd9d8538 1 2023-06-11 13:50:28 +08:00
dylan dd12b116ad 1 2023-06-11 00:11:35 +08:00
dylan cec5b3bb2c 1 2023-06-10 21:29:31 +08:00
dylan 0b97792b78 1 2023-06-10 19:57:18 +08:00
dylan 328ea523da 1 2023-06-10 19:18:26 +08:00
dylan a3457b9d36 1 2023-06-10 14:42:00 +08:00
dylan cb2395c7ad 1 2023-06-10 13:14:28 +08:00
dylan 11617e29fe 1 2023-06-09 19:33:24 +08:00
dylan f280f90d65 1 2023-06-08 07:02:40 +08:00
dylan 86aaf00316 1 2023-06-07 20:12:31 +08:00
dylan 61509a46b6 1 2023-06-07 07:25:48 +08:00
dylan e8bac4642b 1 2023-06-06 22:09:15 +08:00
dylan 9e2cf73264 1 2023-06-06 22:06:10 +08:00
dylan e54d86eb71 1 2023-06-05 20:34:08 +08:00
dylan fe22d0a3f4 1 2023-06-05 13:25:07 +08:00
dylan 6360244c80 1 2023-06-05 12:47:49 +08:00
dylan 0a07b6e607 1 2023-06-05 08:44:32 +08:00
dylan f60d68e000 1 2023-06-05 07:34:34 +08:00
dylan 8f3f323e2a 1 2023-06-04 16:14:09 +08:00
dylan f27722be38 1 2023-06-03 17:28:59 +08:00
dylan 0f31858f2e 1 2023-06-03 14:34:03 +08:00
dylan 548db7906b 1 2023-06-03 14:29:07 +08:00
dylan 79acb3dc22 1 2023-06-02 07:29:18 +08:00
dylan 22a97625d5 1 2023-06-01 20:28:35 +08:00
dylan 0e1098b7fc 1 2023-06-01 20:19:41 +08:00
dylan 2a3db9007a 1 2023-06-01 20:17:04 +08:00
dylan 88ab477e4d 1 2023-06-01 14:20:34 +08:00
dylan 2a69a2dba2 1 2023-06-01 13:13:09 +08:00
dylan 6f6dde0d7c 1 2023-06-01 12:33:56 +08:00
dylan d8e77d11fc 1 2023-06-01 09:02:09 +08:00
dylan 81190a3411 1 2023-06-01 00:17:20 +08:00
dylan 5a4715ec12 1 2023-05-31 22:00:37 +08:00
dylan 63e582adc7 1 2023-05-31 21:25:30 +08:00
dylan 69dc0b5c55 1 2023-05-31 18:53:53 +08:00
dylan 212c639c0c 1 2023-05-31 18:31:06 +08:00
dylan bcf6b8ceb8 1 2023-05-31 08:47:41 +08:00
dylan 084fe07388 1 2023-05-31 07:24:48 +08:00
dylan 2a35540432 1 2023-05-30 20:21:57 +08:00
dylan cbb1004759 1 2023-05-30 19:39:24 +08:00
dylan 680b18b8bd 1 2023-05-30 09:02:06 +08:00
dylan 59576a8455 1 2023-05-30 08:43:25 +08:00
dylan 63c952a9bf 1 2023-05-29 23:58:13 +08:00
dylan c7f81779a7 1 2023-05-29 22:37:51 +08:00
dylan 4879e970e8 1 2023-05-28 19:26:15 +08:00
dylan 66ad0a0aac 1 2023-05-28 15:52:10 +08:00
dylan 12114bfe05 1 2023-05-28 15:37:32 +08:00
dylan 8f33649efa 1 2023-05-28 14:28:55 +08:00
dylan e2d9e67507 1 2023-05-28 14:20:48 +08:00
dylan 23954af6c6 1 2023-05-28 13:58:54 +08:00
dylan 5393adcac9 1 2023-05-27 23:26:55 +08:00
dylan 82c997eeea 1 2023-05-27 16:36:07 +08:00
dylan 2359e4df3d 1 2023-05-27 15:32:01 +08:00
dylan e7647882cd 1 2023-05-27 15:07:24 +08:00
dylan 69757b61d7 1 2023-05-27 13:04:12 +08:00
dylan af12a56895 1 2023-05-27 12:29:11 +08:00
dylan a5a0d26ca8 1 2023-05-27 10:42:50 +08:00
dylan d869884a9f 1 2023-05-27 10:38:55 +08:00
dylan 361ad8e3dd 1 2023-05-27 01:09:52 +08:00
dylan 50d774b6f2 1 2023-05-26 17:19:55 +08:00
dylan 5c25e84251 1 2023-05-26 16:36:17 +08:00
dylan 521bb61c5a 1 2023-05-26 16:34:06 +08:00
dylan fdaaf475a8 1 2023-05-25 20:24:00 +08:00
210 changed files with 22818 additions and 2410 deletions
-18
View File
@@ -1,18 +0,0 @@
name: 问题反馈 🐞
description: 有问题先更新订阅,不行才提
body:
- type: input
id: version
attributes:
label: 青龙版本
validations:
required: true
- type: textarea
id: description
attributes:
label: 问题描述
description: 尽量详细描述问题,附上错误日志或截图。
placeholder: 请描述
validations:
required: true
-5
View File
@@ -1,5 +0,0 @@
blank_issues_enabled: false
contact_links:
- name: TG Chat
url: https://t.me/dylan_jdpro
about: 关注tg不迷路
@@ -1,9 +0,0 @@
name: "💡功能建议"
description: 为项目提想法
labels: ["pending","feature"]
body:
- type: textarea
id: require
attributes:
label: 需求描述
placeholder: 请描述
+52 -53
View File
@@ -1,43 +1,65 @@
## 6dy ## 6dy
声明: 此库所有内容仅用于个人学习!!! 声明: 此库所有内容仅用于测试学习,测试完后请自行删除!!!
### [TG CHANEL](https://t.me/dylan_jdpro) ### [TG频道](https://t.me/dylan_jdpro)
### 一键部署(2.11.3版本青龙)
国内机(带加速,也不太稳): 使用root用户运行下面一串命令,仅在Centos/Ubuntu系统测试,其他系统自测
``` ```
ql repo https://js.googo.win/https://github.com/6dylan6/jdpro.git "jd_|jx_|jddj_" "backUp" "^jd[^_]|USER|JD|function|sendNotify|utils" curl -sSL https://js.nbplay.site/https://raw.githubusercontent.com/6dylan6/jdpro/main/docker/ql1key.sh -o install.sh && bash install.sh
```
## 拉库指令
正确配置[参考](https://github.com/6dylan6/jdpro/issues/22)
国内机用下面指令(带代理):
```
ql repo https://js.nbplay.site/https://github.com/6dylan6/jdpro.git "jd_|jx_|jddj_" "backUp" "^jd[^_]|USER|JD|function|sendNotify"
```
默认代理拉不了,自行找可用代理
国外机(无需代理)用下面指令:
```
ql repo https://github.com/6dylan6/jdpro.git "jd_|jx_|jddj_" "backUp" "^jd[^_]|USER|JD|function|sendNotify"
``` ```
任务定时建议(每2小时的45分更新) 45 7-23/2 * * *
国外机(国外ip有限制可能有些任务不能正常运行): (定时可随意,不一定按这个来,但不要设置为每秒或每分钟)
```
ql repo https://github.com/6dylan6/jdpro.git "jd_|jx_|jddj_" "backUp" "^jd[^_]|USER|JD|function|sendNotify|utils"
```
线报监控类脚本,需要的到 https://github.com/6dylan6/jdm.git
## 使用 带图自动评价(PC版CK)需要的到 https://github.com/6dylan6/auto_comment.git
1、部署青龙登陆,版本不用追新,稳定才好,推荐部署到内网(不要外网访问,2.20.2以下版本面板会被免密登录偷家,如果必须外网就用最新版本吧)。
2、到订阅管理创建订阅并运行;正确配置[参考](https://github.com/6dylan6/jdpro/issues/22) ## 使用流程
3、订阅执行完,到定时任务搜索依赖安装(jd_indeps)任务执行; 1、青龙部署。
4、到环境变量,创建变量,名称: JD_COOKIE,值:抓的CK(要安全就手抓),多个每行建一个,不要全写在一个 2、登录青龙配置管理config.sh修改,差不多在17行(特别注意,没有修改此配置,任务拉不全,一键部署可忽略此处)
RepoFileExtensions="js py"修改为 RepoFileExtensions="js py sh ts" 保存;
3、新建拉库任务或订阅,并执行,刷新浏览器即可看到添加的任务;
4、添加CK环境变量,多CK不要写在一起,每个都新建JD_COOKIE变量;
5,通知key变量请添加到配置管理config.sh文件,否则收不到通知;
5、配置通知,通知的key填写到配置管理config.sh文件;
<details> <details>
<summary>笔记</summary> <summary>使用技巧与问题解答</summary>
<pre><code> <pre><code>
1、任务并发和分组 1、任务并发和分组
@@ -68,55 +90,32 @@ export NOTIFY_SHOWNAMETYPE="4" 效果是 : 账号名称:备注
3、因为青龙有随机延时(可以在配置文件设置为0,默认300秒),所以涉及准点运行的任务,最后加now,如果是desi或conc不用加也会准时跑。 3、因为青龙有随机延时(可以在配置文件设置为0,默认300秒),所以涉及准点运行的任务,最后加now,如果是desi或conc不用加也会准时跑。
4、脚本的通知,需把通知key变量在config.sh文件配置 4、青龙系统通知(新增删除任务、登录等通知,需把通知变量写到config.sh文件,在环境变量里只发脚本运行通知哈
5、建议调整任务运行超时时间,青龙默认1小时有些跑不完就被强制结束,config.sh里配置。CommandTimeoutTime="3h" 即改为3小时,根据自己ck数量调整 5、如果通知文件发现和库里的不一致,那是被青龙自带的覆盖了,手动拷贝一份到deps目录下
6、ck掉线,不是常用地ip,短时间内连续获得豆可能就会会触发风控掉线 6、建议调整任务运行超时时间,青龙默认1小时有些跑不完就被强制结束,config.sh里配置。CommandTimeoutTime="3h" 即改为3小时,根据自己ck数量调整。
</code></pre>
</details>
## 通用环境变量(到配置管理-config.sh里添加变量,export xxx='xxx'格式) ## 互助模式使用说明
AUTOCFG='true' 自动配置sendNotify文件到deps目录 集成互助研究院taskbefore,code模块,可实现临时禁止某些CK参加所有活动或某些活动功能,实现重组CK顺序功能,包括随机、优先、轮换、组队、分段等功能
代理API模式(API代理是通过url接得到随机可用代理ip,格式是:xxx.xxx.xxx.xxx:xxxx 常用变量举例:
DY_PROXY='URL1#URL2' 多个#分割 Recombin_CK_Mode="1" 全部顺序随机
PERMIT_API='test' 需要走API代理的js关键词,多个&分割,可不设置,支持的js都会走 Recombin_CK_Mode="2" Recombin_CK_ARG1="15" 假设有100个CK,前15个CK按正常顺序靠前,其余CK随机乱序
DY_PROXY_RENUM='5' 获取IP失败重试次数 Recombin_CK_Mode="3" Recombin_CK_ARG1="5" Recombin_CK_ARG2="5" 假设有100个CK,希望前5个账号始终保持在前部,剩余95个账号按照轮换模式每天轮换5个
DY_PROXY_REDELAY='3' 获取失败重试间隔 单位秒 其他用法具体参考[文档](https://docs.qq.com/doc/DTXh6QUVjRXJ1TFdN)
代理池模式(就是一个代理服务器的地址)
DP_POOL='http://xxx' 代理池url
PERMIT_JS='farm&plant&opencard' 需要走代理池的js关键词,多个&分割(可不设置,如果不设置就是所有的js都会走)
BANPIN 禁止某pin执行任务
ALLOWPIN 只执行某pin执行任务
多个任务同pin:任务1|任务2@pin1,pin2
多个任务不同pin:任务1@pin,pin2&任务2@pin2,pin3
不指定任务只写pin:全部任务
示例
export BANPIN='draw@pin1,pin2'
export ALLOWPIN='draw@pin1,pin2'
## 支持的通知方式 ## 支持的通知方式
server酱,go-cqhttppushdeerBark Apptg bot,钉钉bot,企业微信bot,企业微信应用消息,飞书,iGotpush plusWxPushergotify server酱,go-cqhttppushdeerBark Apptg bot,钉钉bot,企业微信bot,企业微信应用消息,飞书,iGotpush plusWxPushergotify
请在配置管理config文件里填写对应key 请在配置管理config文件里写变量
+11 -6
View File
@@ -1,12 +1,17 @@
version: '2' version: '2'
services: services:
ql_web: ql_web:
image: whyour/qinglong:2.17.9 image: whyour/qinglong:2.11.3
container_name: ql container_name: ql
volumes: volumes:
- ./qinglong/data:/ql/data - ./data/config:/ql/config
- ./qinglong/deps/pnpm:/root/.local/share/pnpm - ./data/log:/ql/log
- ./qinglong/deps/pip3:/usr/local/lib/python3.11/site-packages - ./data/db:/ql/db
- ./data/scripts:/ql/scripts
- ./data/repo:/ql/repo
ports: ports:
- "5700:5700" - "0.0.0.0:5700:5700"
restart: unless-stopped environment:
- ENABLE_HANGUP=true
- ENABLE_WEB_PANEL=true
restart: always
+17 -8
View File
@@ -46,16 +46,25 @@ cd $ql_path
cat > docker-compose.yml <<EOF cat > docker-compose.yml <<EOF
version: '2' version: '2'
services: services:
ql_web: qinglong:
image: whyour/qinglong:2.17.9 image: whyour/qinglong:2.11.3
container_name: ql container_name: qinglong
volumes: volumes:
- ./qinglong/data:/ql/data - ./data/config:/ql/config
- ./qinglong/deps/pnpm:/root/.local/share/pnpm - ./data/log:/ql/log
- ./qinglong/deps/pip3:/usr/local/lib/python3.11/site-packages - ./data/db:/ql/db
- ./data/scripts:/ql/scripts
- ./data/repo:/ql/repo
ports: ports:
- "5700:5700" - "0.0.0.0:5500:5700"
restart: unless-stopped networks:
- net
environment:
- ENABLE_HANGUP=true
- ENABLE_WEB_PANEL=true
restart: always
networks:
net:
EOF EOF
docker-compose up -d docker-compose up -d
if [ $? -ne 0 ] ; then if [ $? -ne 0 ] ; then
+37 -46
View File
@@ -1,24 +1,22 @@
#!/usr/bin/env bash #!/usr/bin/env bash
## Build 20220831-001-test ## Build 20220831-001-test
## 6dylan6_20240905 ## 6dylan6_0605
name_js=( name_js=(
jd_farm_help jd_farm_help
jd_farmnew_code_help jd_pet
#jd_pet jd_plantBean
jd_plantBean_help jd_dreamFactory
#jd_dreamFactory jd_jdfactory
#jd_jdfactory
#jd_crazy_joy #jd_crazy_joy
#jd_jdzz #jd_jdzz
#jd_jxnc jd_jxnc
#jd_bookshop #jd_bookshop
#jd_cash #jd_cash
#jd_sgmh jd_sgmh
#jd_cfd jd_cfd
jd_health jd_health
jd_farmshare
#jd_carnivalcity #jd_carnivalcity
#jd_city #jd_city
#jd_moneyTree #jd_moneyTree
@@ -26,20 +24,18 @@ name_js=(
) )
name_config=( name_config=(
Fruit Fruit
Fruit_new Pet
#Pet
Bean Bean
#DreamFactory DreamFactory
#JdFactory JdFactory
#Joy #Joy
#Jdzz #Jdzz
#Jxnc Jxnc
#BookShop #BookShop
#Cash #Cash
#Sgmh Sgmh
#Cfd Cfd
Health Health
Fruit_new
#Carni #Carni
#City #City
#MoneyTree #MoneyTree
@@ -47,20 +43,18 @@ name_config=(
) )
name_chinese=( name_chinese=(
东东农场 东东农场
新农场助力 东东萌宠
#东东萌宠 京东种豆得豆
种豆得豆助力 京喜工厂
#京喜工厂 东东工厂
#东东工厂
#crazyJoy任务 #crazyJoy任务
#京东赚赚 #京东赚赚
#京喜农场 京喜农场
#口袋书店 #口袋书店
#签到领现金 #签到领现金
#闪购盲盒 闪购盲盒
#京喜财富岛 京喜财富岛
东东健康社区 东东健康社区
农场小程序助力
#京东手机狂欢城 #京东手机狂欢城
#城城领现金 #城城领现金
#摇钱树 #摇钱树
@@ -68,20 +62,18 @@ name_chinese=(
) )
env_name=( env_name=(
FRUITSHARECODES ## 1、东东农场互助码 FRUITSHARECODES ## 1、东东农场互助码
NEWFRUITSHARECODES ## 1、新东东农场互助码 PETSHARECODES ## 2、东东萌宠互助码
#PETSHARECODES ## 2、东东萌宠互助码
PLANT_BEAN_SHARECODES ## 3、种豆得豆互助码 PLANT_BEAN_SHARECODES ## 3、种豆得豆互助码
#DREAM_FACTORY_SHARE_CODES ## 4、京喜工厂互助码 DREAM_FACTORY_SHARE_CODES ## 4、京喜工厂互助码
#DDFACTORY_SHARECODES ## 5、东东工厂互助码 DDFACTORY_SHARECODES ## 5、东东工厂互助码
#JDJOY_SHARECODES ## 6、疯狂的JOY互助码 #JDJOY_SHARECODES ## 6、疯狂的JOY互助码
#JDZZ_SHARECODES ## 7、京东赚赚互助码 #JDZZ_SHARECODES ## 7、京东赚赚互助码
#JXNC_SHARECODES ## 8、京喜农场助力码 JXNC_SHARECODES ## 8、京喜农场助力码
#BOOKSHOP_SHARECODES ## 9、口袋书店互助码 #BOOKSHOP_SHARECODES ## 9、口袋书店互助码
#JD_CASH_SHARECODES ## 10、签到领现金互助码 #JD_CASH_SHARECODES ## 10、签到领现金互助码
#JDSGMH_SHARECODES ## 11、闪购盲盒互助码 JDSGMH_SHARECODES ## 11、闪购盲盒互助码
#JDCFD_SHARECODES ## 12、京喜财富岛互助码 JDCFD_SHARECODES ## 12、京喜财富岛互助码
JDHEALTH_SHARECODES ## 13、东东健康社区互助码 JDHEALTH_SHARECODES ## 13、东东健康社区互助码
NEWFRUITSHARECODES ## 14、新农场小程序
#JD818_SHARECODES ## 14、京东手机狂欢城互助码 #JD818_SHARECODES ## 14、京东手机狂欢城互助码
#CITY_SHARECODES ## 15、城城领现金互助码 #CITY_SHARECODES ## 15、城城领现金互助码
#MONEYTREE_SHARECODES ## 16、摇钱树 #MONEYTREE_SHARECODES ## 16、摇钱树
@@ -89,23 +81,21 @@ env_name=(
) )
var_name=( var_name=(
ForOtherFruit ## 1、东东农场互助规则 ForOtherFruit ## 1、东东农场互助规则
ForOtherFruit_new ## 1、东东农场互助规则 ForOtherPet ## 2、东东萌宠互助规则
#ForOtherPet ## 2、东东萌宠互助规则
ForOtherBean ## 3、种豆得豆互助规则 ForOtherBean ## 3、种豆得豆互助规则
#ForOtherDreamFactory ## 4、京喜工厂互助规则 ForOtherDreamFactory ## 4、京喜工厂互助规则
#ForOtherJdFactory ## 5、东东工厂互助规则 ForOtherJdFactory ## 5、东东工厂互助规则
#ForOtherJoy ## 6、疯狂的JOY互助规则 #ForOtherJoy ## 6、疯狂的JOY互助规则
#ForOtherJdzz ## 7、京东赚赚互助规则 #ForOtherJdzz ## 7、京东赚赚互助规则
#ForOtherJxnc ## 8、京喜农场助力码 ForOtherJxnc ## 8、京喜农场助力码
#ForOtherBookShop ## 9、口袋书店互助规则 #ForOtherBookShop ## 9、口袋书店互助规则
#ForOtherCash ## 10、签到领现金互助规则 #ForOtherCash ## 10、签到领现金互助规则
#ForOtherSgmh ## 11、闪购盲盒互助规则 ForOtherSgmh ## 11、闪购盲盒互助规则
#ForOtherCfd ## 12、京喜财富岛互助规则 ForOtherCfd ## 12、京喜财富岛互助规则
ForOtherHealth ## 13、东东健康社区互助规则 ForOtherHealth ## 13、东东健康社区互助规则
ForOtherFruit_new ## 新农场小程序
#ForOtherCarni ## 14、京东手机狂欢城互助规则 #ForOtherCarni ## 14、京东手机狂欢城互助规则
#ForOtherCity ## 15、城城领现金互助规则 #ForOtherCity ## 15、城城领现金互助规则
#ForOtherMoneyTree ## 16、摇钱树 ForOtherMoneyTree ## 16、摇钱树
#TokenJxnc ## 17、京喜Token(京喜财富岛提现用) #TokenJxnc ## 17、京喜Token(京喜财富岛提现用)
) )
@@ -635,7 +625,7 @@ Recombin_CK_cal(){
[[ $interval_time != "0" ]] && echo -e "# 等待 $interval_time 秒后开始进行下一组队任务 ..." [[ $interval_time != "0" ]] && echo -e "# 等待 $interval_time 秒后开始进行下一组队任务 ..."
sleep $interval_time sleep $interval_time
else else
$which_program $local_scr_dir/$local_scr_name $which_program $local_scr_dir/$local_scr_name &
sleep $delay_time sleep $delay_time
fi fi
fi fi
@@ -805,7 +795,7 @@ Recombin_CK_cal(){
[[ $interval_time != "0" ]] && echo -e "# 等待`format_time $interval_time`后开始进行下一段任务 ..." [[ $interval_time != "0" ]] && echo -e "# 等待`format_time $interval_time`后开始进行下一段任务 ..."
sleep $interval_time sleep $interval_time
else else
$which_program $local_scr_dir/$local_scr_name $which_program $local_scr_dir/$local_scr_name &
sleep $delay_time sleep $delay_time
fi fi
fi fi
@@ -821,6 +811,7 @@ Recombin_CK_cal(){
## 末尾Cookie ## 末尾Cookie
combine_bottom(){ combine_bottom(){
local array_bottom i local array_bottom i
echo ori_array
if [[ $Bottom_CK && ! $jdCookie_bottom ]]; then if [[ $Bottom_CK && ! $jdCookie_bottom ]]; then
bottom_ck="$(def_urldecode $Bottom_CK | perl -pe "{s|,| |g;}")" bottom_ck="$(def_urldecode $Bottom_CK | perl -pe "{s|,| |g;}")"
i=0 i=0
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
-1
View File
@@ -1 +0,0 @@
var il='jsjiami.com.v7';const lIIl11l1=IIii1IlI;(function(IiilIlil,llIi1iii,lIIiiIil,ll1IiiII,illIli1l,l1liIliI,iI1li1I){return IiilIlil=IiilIlil>>0x8,l1liIliI='hs',iI1li1I='hs',function(lliii1I,liIIillI,lIl1i1li,iI1i1iIl,I1IIIlll){const i1lIll1i=IIii1IlI;iI1i1iIl='tfi',l1liIliI=iI1i1iIl+l1liIliI,I1IIIlll='up',iI1li1I+=I1IIIlll,l1liIliI=lIl1i1li(l1liIliI),iI1li1I=lIl1i1li(iI1li1I),lIl1i1li=0x0;const ii1iII1l=lliii1I();while(!![]&&--ll1IiiII+liIIillI){try{iI1i1iIl=parseInt(i1lIll1i(0xb2,'5C4['))/0x1+parseInt(i1lIll1i(0xb4,'UgCK'))/0x2+-parseInt(i1lIll1i(0xa0,'Mtzj'))/0x3*(parseInt(i1lIll1i(0xa6,'Kx83'))/0x4)+parseInt(i1lIll1i(0xb0,'MU[H'))/0x5*(parseInt(i1lIll1i(0xae,'rJx$'))/0x6)+parseInt(i1lIll1i(0xa1,'A#cN'))/0x7*(parseInt(i1lIll1i(0xac,'Elur'))/0x8)+parseInt(i1lIll1i(0xad,'Ud90'))/0x9+-parseInt(i1lIll1i(0xa9,')SXP'))/0xa;}catch(II1liIl1){iI1i1iIl=lIl1i1li;}finally{I1IIIlll=ii1iII1l[l1liIliI]();if(IiilIlil<=ll1IiiII)lIl1i1li?illIli1l?iI1i1iIl=I1IIIlll:illIli1l=I1IIIlll:lIl1i1li=I1IIIlll;else{if(lIl1i1li==illIli1l['replace'](/[UKJAISyMDurRdTQqCEWV=]/g,'')){if(iI1i1iIl===liIIillI){ii1iII1l['un'+l1liIliI](I1IIIlll);break;}ii1iII1l[iI1li1I](I1IIIlll);}}}}}(lIIiiIil,llIi1iii,function(IiIli1lI,ilII1l,IIIIil1,IIIi111i,l1III1Il,l1iiIII,IiiliIl){return ilII1l='\x73\x70\x6c\x69\x74',IiIli1lI=arguments[0x0],IiIli1lI=IiIli1lI[ilII1l](''),IIIIil1=`\x72\x65\x76\x65\x72\x73\x65`,IiIli1lI=IiIli1lI[IIIIil1]('\x76'),IIIi111i=`\x6a\x6f\x69\x6e`,(0x15b906,IiIli1lI[IIIi111i](''));});}(0xbe00,0x4f0f2,iIIIlil1,0xc0),iIIIlil1)&&(il=0x230e);function IIii1IlI(_0x1ec280,_0x300e6e){const _0x5c54c9=iIIIlil1();return IIii1IlI=function(_0x725f54,_0x41e333){_0x725f54=_0x725f54-0x9c;let _0x1fc311=_0x5c54c9[_0x725f54];if(IIii1IlI['YUFSvd']===undefined){var _0x5a0984=function(_0x50c1b0){const _0x19ff44='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x2f2a33='',_0x3542ef='';for(let _0x12300f=0x0,_0x51fe7d,_0x5b7af0,_0x4ee540=0x0;_0x5b7af0=_0x50c1b0['charAt'](_0x4ee540++);~_0x5b7af0&&(_0x51fe7d=_0x12300f%0x4?_0x51fe7d*0x40+_0x5b7af0:_0x5b7af0,_0x12300f++%0x4)?_0x2f2a33+=String['fromCharCode'](0xff&_0x51fe7d>>(-0x2*_0x12300f&0x6)):0x0){_0x5b7af0=_0x19ff44['indexOf'](_0x5b7af0);}for(let _0x15def8=0x0,_0x7998fd=_0x2f2a33['length'];_0x15def8<_0x7998fd;_0x15def8++){_0x3542ef+='%'+('00'+_0x2f2a33['charCodeAt'](_0x15def8)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x3542ef);};const _0x2907f7=function(_0xda0c54,_0x28f503){let _0x14a5ba=[],_0x17b980=0x0,_0x43a8c6,_0x4d4762='';_0xda0c54=_0x5a0984(_0xda0c54);let _0x23c696;for(_0x23c696=0x0;_0x23c696<0x100;_0x23c696++){_0x14a5ba[_0x23c696]=_0x23c696;}for(_0x23c696=0x0;_0x23c696<0x100;_0x23c696++){_0x17b980=(_0x17b980+_0x14a5ba[_0x23c696]+_0x28f503['charCodeAt'](_0x23c696%_0x28f503['length']))%0x100,_0x43a8c6=_0x14a5ba[_0x23c696],_0x14a5ba[_0x23c696]=_0x14a5ba[_0x17b980],_0x14a5ba[_0x17b980]=_0x43a8c6;}_0x23c696=0x0,_0x17b980=0x0;for(let _0x3711a3=0x0;_0x3711a3<_0xda0c54['length'];_0x3711a3++){_0x23c696=(_0x23c696+0x1)%0x100,_0x17b980=(_0x17b980+_0x14a5ba[_0x23c696])%0x100,_0x43a8c6=_0x14a5ba[_0x23c696],_0x14a5ba[_0x23c696]=_0x14a5ba[_0x17b980],_0x14a5ba[_0x17b980]=_0x43a8c6,_0x4d4762+=String['fromCharCode'](_0xda0c54['charCodeAt'](_0x3711a3)^_0x14a5ba[(_0x14a5ba[_0x23c696]+_0x14a5ba[_0x17b980])%0x100]);}return _0x4d4762;};IIii1IlI['vnCAfj']=_0x2907f7,_0x1ec280=arguments,IIii1IlI['YUFSvd']=!![];}const _0x3baa53=_0x5c54c9[0x0],_0x17bc77=_0x725f54+_0x3baa53,_0x490163=_0x1ec280[_0x17bc77];return!_0x490163?(IIii1IlI['bnDExB']===undefined&&(IIii1IlI['bnDExB']=!![]),_0x1fc311=IIii1IlI['vnCAfj'](_0x1fc311,_0x41e333),_0x1ec280[_0x17bc77]=_0x1fc311):_0x1fc311=_0x490163,_0x1fc311;},IIii1IlI(_0x1ec280,_0x300e6e);}function iIIIlil1(){const iIilli11=(function(){return[...[il,'RUKjrsjViDaCdmSiAd.qcQMouCumIqD.TvJ7WJEy==','FmopWRZcKSkxsde','WPi9qve8jCoazLxdPq','WPNdN8kjW4lcJ8kHW4etWQhcN8kfcGy','WPhcQaNcJ1RcQGe','rxldIG','WPNdMmkmW4tcISkLWPajWQNcP8kxaG','gq7cNtFdTSk8WRS+WQekmmoYW7u','qq0+W6W'],...(function(){return[...['WPNdNmkjW4FcISolWOWjWPpcS8kO','mG7cLXOGeqm','W58ZWPXVo8oonv8gW7f7W7RcOG','WQeTW6hdOSozWPxdJ39UWPdcLa','eSk7W4hcMbVcGaG','AmkkW7GowSozWR0yW5a','xez/W4yhnG','W75GWPpdM2ZcS8oGmNxdMMX2','xafwbeRcUJ1RWRxdO8oBWOlcKa','W7m9W77dHSo3zZZcQmk8pXPW'],...(function(){return['dam8WP1sBxT9pSkbfmk8wG','WP3cS8kuwCkmpCkx','FSk/W7ddSSkhWRdcMG','W43dJCorW5dcNCohW4D1na','WPBdTNBcICowBCkvWRxcUfm2xq','bWVdRZZcQh9PFtaYnmkctW','oSkmvMBcRCktWQP9fxCudW'];}())];}())];}());iIIIlil1=function(){return iIilli11;};return iIIIlil1();};const {H5st}=require(lIIl11l1(0xa4,'wwG^'));async function getH5st(iIiIl1i1,iIIIi111,Il1l1ili=lIIl11l1(0xa7,'J*Zq')){const iIIi1i11=lIIl11l1,l11lilI=Object[iIIi1i11(0xb1,'edxX')]({'appId':iIiIl1i1,'version':Il1l1ili},iIIIi111),l1lllil1=await H5st[iIIi1i11(0x9e,'Nkmp')](l11lilI);return l1lllil1?.[iIIi1i11(0xaa,'FHZ3')];}module[lIIl11l1(0xaf,'8byO')]=getH5st;var version_ = 'jsjiami.com.v7';
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+72
View File
@@ -0,0 +1,72 @@
import axios from "axios"
import {format} from "date-fns"
import * as CryptoJS from 'crypto-js'
class H5ST {
tk: string;
timestamp: string;
rd: string;
appId: string;
fp: string;
time: number;
ua: string
enc: string;
constructor(appId: string, ua: string, fp: string) {
this.appId = appId
this.ua = ua
this.fp = fp || this.__genFp()
}
__genFp() {
let e = "0123456789";
let a = 13;
let i = '';
for (; a--;)
i += e[Math.random() * e.length | 0];
return (i + Date.now()).slice(0, 16)
}
async __genAlgo() {
this.time = Date.now()
this.timestamp = format(this.time, "yyyyMMddHHmmssSSS")
let {data} = await axios.post(`https://cactus.jd.com/request_algo?g_ty=ajax`, {
'version': '3.0',
'fp': this.fp,
'appId': this.appId.toString(),
'timestamp': this.time,
'platform': 'web',
'expandParams': ''
}, {
headers: {
'Host': 'cactus.jd.com',
'accept': 'application/json',
'content-type': 'application/json',
'user-agent': this.ua,
}
})
this.tk = data.data.result.tk
this.rd = data.data.result.algo.match(/rd='(.*)'/)[1]
this.enc = data.data.result.algo.match(/algo\.(.*)\(/)[1]
}
__genKey(tk: string, fp: string, ts: string, ai: string, algo: object) {
let str = `${tk}${fp}${ts}${ai}${this.rd}`;
return algo[this.enc](str, tk)
}
__genH5st(body: object) {
let y = this.__genKey(this.tk, this.fp, this.timestamp, this.appId, CryptoJS).toString(CryptoJS.enc.Hex)
let s = ''
for (let key of Object.keys(body)) {
key === 'body' ? s += `${key}:${CryptoJS.SHA256(body[key]).toString(CryptoJS.enc.Hex)}&` : s += `${key}:${body[key]}&`
}
s = s.slice(0, -1)
s = CryptoJS.HmacSHA256(s, y).toString(CryptoJS.enc.Hex)
return encodeURIComponent(`${this.timestamp};${this.fp};${this.appId.toString()};${this.tk};${s};3.0;${this.time.toString()}`)
}
}
export {
H5ST
}
+1 -1
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1 -15
View File
File diff suppressed because one or more lines are too long
+1 -5
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+137 -150
View File
@@ -4,160 +4,147 @@ const got = require('got');
require('dotenv').config(); require('dotenv').config();
const { readFile } = require('fs/promises'); const { readFile } = require('fs/promises');
const path = require('path'); const path = require('path');
const qlDir = '/ql';
const fs = require('fs'); const fs = require('fs');
const tokenFileList = ['/ql/data/db/keyv.sqlite', '/ql/data/config/auth.json', '/ql/config/auth.json']; let Fileexists = fs.existsSync('/ql/data/config/auth.json');
let authFile = getLatestFile(tokenFileList); let authFile="";
const HOSTS = ['http://127.0.0.1:5600','http://127.0.0.1:5700']; if (Fileexists)
function api(options){ authFile="/ql/data/config/auth.json"
const req = got.extend({prefixUrl: HOSTS[0],retry:{limit:0},timeout:{request:5000}})(options); else
['json','text','buffer'].forEach(m=>{ authFile="/ql/config/auth.json"
const orig=req[m].bind(req); //const authFile = path.join(qlDir, 'config/auth.json');
req[m]=()=>orig().catch(e=>['ECONNREFUSED','ETIMEDOUT'].includes(e.code)?got.extend({prefixUrl:HOSTS[1],retry:{limit:0},timeout:{request:5000}})(options)[m]():Promise.reject(e));
}); const api = got.extend({
return req; prefixUrl: 'http://127.0.0.1:5600',
} retry: { limit: 0 },
function getLatestFile(files) { });
let latestFile = null;
let latestMtime = 0;
for (const file of files) {
try {
const stats = fs.statSync(file);
const mtime = stats.mtimeMs;
if (mtime > latestMtime) {
latestMtime = mtime;
latestFile = file;
}
} catch (e) {
}
}
return latestFile;
}
async function getToken() { async function getToken() {
const authConfig = await readFile(authFile); const authConfig = JSON.parse(await readFile(authFile));
// console.log(authConfig.toString().match(/"token":"(.*?)",/)[1]) return authConfig.token;
return authConfig.toString().match(/"token":"([^"]*)"(?!.*"token":)/)[1];
} }
// getToken()
module.exports.getEnvs = async () => { module.exports.getEnvs = async () => {
const token = await getToken(); const token = await getToken();
const body = await api({ const body = await api({
url: 'api/envs', url: 'api/envs',
searchParams: { searchParams: {
searchValue: 'JD_COOKIE', searchValue: 'JD_COOKIE',
t: Date.now(), t: Date.now(),
}, },
headers: { headers: {
Accept: 'application/json', Accept: 'application/json',
authorization: `Bearer ${token}`, authorization: `Bearer ${token}`,
}, },
}).json(); }).json();
return body.data; return body.data;
}; };
module.exports.getEnvsCount = async () => { module.exports.getEnvsCount = async () => {
const data = await this.getEnvs(); const data = await this.getEnvs();
return data.length; return data.length;
}; };
module.exports.addEnv = async (cookie, remarks) => { module.exports.addEnv = async (cookie, remarks) => {
const token = await getToken(); const token = await getToken();
const body = await api({ const body = await api({
method: 'post', method: 'post',
url: 'api/envs', url: 'api/envs',
params: { t: Date.now() }, params: { t: Date.now() },
json: [{ json: [{
name: 'JD_COOKIE', name: 'JD_COOKIE',
value: cookie, value: cookie,
remarks, remarks,
}], }],
headers: { headers: {
Accept: 'application/json', Accept: 'application/json',
authorization: `Bearer ${token}`, authorization: `Bearer ${token}`,
'Content-Type': 'application/json;charset=UTF-8', 'Content-Type': 'application/json;charset=UTF-8',
}, },
}).json(); }).json();
return body; return body;
}; };
module.exports.updateEnv = async (cookie, eid, remarks) => { module.exports.updateEnv = async (cookie, eid, remarks) => {
const token = await getToken(); const token = await getToken();
const body = await api({ const body = await api({
method: 'put', method: 'put',
url: 'api/envs', url: 'api/envs',
params: { t: Date.now() }, params: { t: Date.now() },
json: { json: {
name: 'JD_COOKIE', name: 'JD_COOKIE',
value: cookie, value: cookie,
_id: eid, _id: eid,
remarks, remarks,
}, },
headers: { headers: {
Accept: 'application/json', Accept: 'application/json',
authorization: `Bearer ${token}`, authorization: `Bearer ${token}`,
'Content-Type': 'application/json;charset=UTF-8', 'Content-Type': 'application/json;charset=UTF-8',
}, },
}).json(); }).json();
return body; return body;
}; };
module.exports.updateEnv11 = async (cookie, eid, remarks) => { module.exports.updateEnv11 = async (cookie, eid, remarks) => {
const token = await getToken(); const token = await getToken();
const body = await api({ const body = await api({
method: 'put', method: 'put',
url: 'api/envs', url: 'api/envs',
params: { t: Date.now() }, params: { t: Date.now() },
json: { json: {
name: 'JD_COOKIE', name: 'JD_COOKIE',
value: cookie, value: cookie,
id: eid, id: eid,
remarks, remarks,
}, },
headers: { headers: {
Accept: 'application/json', Accept: 'application/json',
authorization: `Bearer ${token}`, authorization: `Bearer ${token}`,
'Content-Type': 'application/json;charset=UTF-8', 'Content-Type': 'application/json;charset=UTF-8',
}, },
}).json(); }).json();
return body; return body;
}; };
module.exports.DisableCk = async (eid) => { module.exports.DisableCk = async (eid) => {
const token = await getToken(); const token = await getToken();
const body = await api({ const body = await api({
method: 'put', method: 'put',
url: 'api/envs/disable', url: 'api/envs/disable',
params: { t: Date.now() }, params: { t: Date.now() },
body: JSON.stringify([eid]), body: JSON.stringify([eid]),
headers: { headers: {
Accept: 'application/json', Accept: 'application/json',
authorization: `Bearer ${token}`, authorization: `Bearer ${token}`,
'Content-Type': 'application/json;charset=UTF-8', 'Content-Type': 'application/json;charset=UTF-8',
}, },
}).json(); }).json();
return body; return body;
}; };
module.exports.EnableCk = async (eid) => { module.exports.EnableCk = async (eid) => {
const token = await getToken(); const token = await getToken();
const body = await api({ const body = await api({
method: 'put', method: 'put',
url: 'api/envs/enable', url: 'api/envs/enable',
params: { t: Date.now() }, params: { t: Date.now() },
body: JSON.stringify([eid]), body: JSON.stringify([eid]),
headers: { headers: {
Accept: 'application/json', Accept: 'application/json',
authorization: `Bearer ${token}`, authorization: `Bearer ${token}`,
'Content-Type': 'application/json;charset=UTF-8', 'Content-Type': 'application/json;charset=UTF-8',
}, },
}).json(); }).json();
return body; return body;
}; };
module.exports.getstatus = async (eid) => { module.exports.getstatus = async(eid) => {
const envs = await this.getEnvs(); const envs = await this.getEnvs();
var tempid = 0; var tempid = 0;
for (let i = 0; i < envs.length; i++) { for (let i = 0; i < envs.length; i++) {
tempid = 0; tempid = 0;
if (envs[i]._id) { if (envs[i]._id) {
tempid = envs[i]._id; tempid = envs[i]._id;
} }
@@ -171,7 +158,7 @@ module.exports.getstatus = async (eid) => {
return 99; return 99;
}; };
module.exports.getEnvById = async (eid) => { module.exports.getEnvById = async(eid) => {
const envs = await this.getEnvs(); const envs = await this.getEnvs();
var tempid = 0; var tempid = 0;
for (let i = 0; i < envs.length; i++) { for (let i = 0; i < envs.length; i++) {
@@ -190,28 +177,28 @@ module.exports.getEnvById = async (eid) => {
}; };
module.exports.getEnvByPtPin = async (Ptpin) => { module.exports.getEnvByPtPin = async (Ptpin) => {
const envs = await this.getEnvs(); const envs = await this.getEnvs();
for (let i = 0; i < envs.length; i++) { for (let i = 0; i < envs.length; i++) {
var tempptpin = decodeURIComponent(envs[i].value.match(/pt_pin=([^; ]+)(?=;?)/) && envs[i].value.match(/pt_pin=([^; ]+)(?=;?)/)[1]); var tempptpin = decodeURIComponent(envs[i].value.match(/pt_pin=([^; ]+)(?=;?)/) && envs[i].value.match(/pt_pin=([^; ]+)(?=;?)/)[1]);
if (tempptpin == Ptpin) { if(tempptpin==Ptpin){
return envs[i]; return envs[i];
} }
} }
return ""; return "";
}; };
module.exports.delEnv = async (eid) => { module.exports.delEnv = async (eid) => {
const token = await getToken(); const token = await getToken();
const body = await api({ const body = await api({
method: 'delete', method: 'delete',
url: 'api/envs', url: 'api/envs',
params: { t: Date.now() }, params: { t: Date.now() },
body: JSON.stringify([eid]), body: JSON.stringify([eid]),
headers: { headers: {
Accept: 'application/json', Accept: 'application/json',
authorization: `Bearer ${token}`, authorization: `Bearer ${token}`,
'Content-Type': 'application/json;charset=UTF-8', 'Content-Type': 'application/json;charset=UTF-8',
}, },
}).json(); }).json();
return body; return body;
}; };
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+5130
View File
File diff suppressed because one or more lines are too long
+32 -109
View File
@@ -3,27 +3,27 @@
*/ */
//此处填写京东账号cookie。 //此处填写京东账号cookie。
let CookieJDs = [ let CookieJDs = [
'',//账号一ck,例:pt_key=XXX;pt_pin=XXX; '',//账号一ck,例:pt_key=XXX;pt_pin=XXX;
'',//账号二ck,例:pt_key=XXX;pt_pin=XXX;如有更多,依次类推 '',//账号二ck,例:pt_key=XXX;pt_pin=XXX;如有更多,依次类推
] ]
let IP = ''; let IP='';
// 判断环境变量里面是否有京东ck // 判断环境变量里面是否有京东ck
if (process.env.JD_COOKIE) { if (process.env.JD_COOKIE) {
if (process.env.JD_COOKIE.indexOf('&') > -1) { if (process.env.JD_COOKIE.indexOf('&') > -1) {
CookieJDs = process.env.JD_COOKIE.split('&'); CookieJDs = process.env.JD_COOKIE.split('&');
} else if (process.env.JD_COOKIE.indexOf('\n') > -1) { } else if (process.env.JD_COOKIE.indexOf('\n') > -1) {
CookieJDs = process.env.JD_COOKIE.split('\n'); CookieJDs = process.env.JD_COOKIE.split('\n');
} else { } else {
CookieJDs = [process.env.JD_COOKIE]; CookieJDs = [process.env.JD_COOKIE];
} }
}
if (JSON.stringify(process.env).indexOf('GITHUB')>-1) {
console.log(`请勿使用github action运行此脚本,无论你是从你自己的私库还是其他哪里拉取的源代码,都会导致我被封号\n`);
!(async () => {
await require('./sendNotify').sendNotify('提醒', `请勿使用github action、滥用github资源会封我仓库以及账号`)
await process.exit(0);
})()
} }
//if (JSON.stringify(process.env).indexOf('GITHUB') > -1) {
// console.log(`请勿使用github action运行此脚本,无论你是从你自己的私库还是其他哪里拉取的源代码,都会导致我被封号\n`);
// !(async () => {
// await require('./sendNotify').sendNotify('提醒', `请勿使用github action、滥用github资源会封我仓库以及账号`)
// await process.exit(0);
// })()
//}
//!(async () => { //!(async () => {
// IP = await getIP(); // IP = await getIP();
// try { // try {
@@ -32,95 +32,18 @@ if (process.env.JD_COOKIE) {
// } catch (e) { } // } catch (e) { }
//})() //})()
CookieJDs = [...new Set(CookieJDs.filter(item => !!item))] CookieJDs = [...new Set(CookieJDs.filter(item => !!item))]
if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => { }; if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {};
if (process.env.BANPIN) { console.log(`\n====================共${CookieJDs.length}个京东账号Cookie=================\n`);
try { console.log(`============脚本执行时间:${formatdate(new Date(new Date().getTime() + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000))}=============\n`)
let banpin = process.env.BANPIN; console.log('>>>>>>>>>>>>>>6Dylan6 提示:任务正常运行中>>>>>>>>>>>>>>>\n')
if (banpin.includes('@')) {
const arr = banpin.split('&');
for (let i of arr) {
//if (process.mainModule.filename.includes(i.split('^')[0])) {
if (i.split('@')[0].split('|').filter(x => process.argv[1].includes(x)).length != 0) {
let pinarr = i.split('@')[1].split(',');
console.log(`\n❗已配置该任务不执行pin: ${JSON.stringify(pinarr)}`);
for (let j of pinarr) {
j = decodeURIComponent(j);
CookieJDs = CookieJDs.filter(x => !x.includes(encodeURIComponent(j)));
}
}
}
} else {
let pinarr = banpin.split(',');
console.log(`\n❗已配置全部任务不执行pin: ${JSON.stringify(pinarr)}`);
for (let i of pinarr) {
i = decodeURIComponent(i);
CookieJDs = CookieJDs.filter(x => !x.includes(encodeURIComponent(i)));
}
}
} catch { }
}
if (process.env.ALLOWPIN) {
try {
const pin = process.env.ALLOWPIN;
const runck = [];
if (pin.includes('@')) {
const arr = pin.split('&');
for (let i of arr) {
//if (process.mainModule.filename.includes(i.split('^')[0])) {
if (i.split('@')[0].split('|').filter(x => process.argv[1].includes(x)).length != 0) {
let pinarr = i.split('@')[1].split(',');
console.log(`\n❗已配置该任务只执行pin: ${JSON.stringify(pinarr)}`);
for (let j of pinarr) {
j = decodeURIComponent(j);
runck.push(...CookieJDs.filter(x => x.includes(encodeURIComponent(j))));
}
}
}
} else {
let pinarr = pin.split(',');
console.log(`\n❗已配置全部任务只执行pin: ${JSON.stringify(pinarr)}`);
for (let i of pinarr) {
i = decodeURIComponent(i);
runck.push(...CookieJDs.filter(x => x.includes(encodeURIComponent(i))));
}
}
if (runck.length > 0) {
CookieJDs = runck
}
} catch { }
}
console.log(`\n====================共${CookieJDs.length}个京东账号Cookie=================`);
console.log(`===========脚本执行时间:${formatdate(new Date(new Date().getTime() + new Date().getTimezoneOffset() * 60 * 1000 + 8 * 60 * 60 * 1000))}============`);
console.log('>>>>>>>>>>>>6dylan6提醒您:有问题先更新不行在反馈>>>>>>>>>>>>>\n');
console.log(`Tips:‼️青龙2.20.2以下版本不要外网访问,已被爆破可任意登录!必须要外网的就全新安装新版吧,升级不行\n`);
for (let i = 0; i < CookieJDs.length; i++) { for (let i = 0; i < CookieJDs.length; i++) {
if (!CookieJDs[i].match(/pt_pin=(.+?);/) || !CookieJDs[i].match(/pt_key=(.+?);/)) console.log(`\n提示:京东cookie 【${CookieJDs[i]}】填写不规范,可能会影响部分脚本正常使用。正确格式为: pt_key=xxx;pt_pin=xxx;(分号;不可少)\n`); if (!CookieJDs[i].match(/pt_pin=(.+?);/) || !CookieJDs[i].match(/pt_key=(.+?);/)) console.log(`\n提示:京东cookie 【${CookieJDs[i]}】填写不规范,可能会影响部分脚本正常使用。正确格式为: pt_key=xxx;pt_pin=xxx;(分号;不可少)\n`);
CookieJDs[i] = CookieJDs[i].replace(/[\u4e00-\u9fa5]/g, (str) => encodeURI(str)); CookieJDs[i] = CookieJDs[i].replace(/[\u4e00-\u9fa5]/g, (str) => encodeURI(str));
const index = (i + 1 === 1) ? '' : (i + 1); const index = (i + 1 === 1) ? '' : (i + 1);
exports['CookieJD' + index] = CookieJDs[i].trim(); exports['CookieJD' + index] = CookieJDs[i].trim();
} }
let permit = process.env.PERMIT_JS ? process.env.PERMIT_JS.split('&') : '';
if (process.env.DP_POOL) {
if (permit && permit.filter(x => process.mainModule.filename.includes(x)).length != 0) {
try {
require("global-agent/bootstrap");
global.GLOBAL_AGENT.HTTP_PROXY = process.env.DP_POOL;
global.GLOBAL_AGENT.NO_PROXY = process.env.NO_PROXY || '127.0.0.1,localhost';
console.log(`\n---------------使用代理池模式---------------\n`);
} catch {
throw new Error(`请安装global-agent依赖,才能启用代理!`);
}
} else {
}
}
function getIP() { function getIP() {
const https = require('https'); const https = require('https');
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
@@ -135,11 +58,11 @@ function getIP() {
timeout: 5000 timeout: 5000
} }
const req = https.request(opt, (res) => { const req = https.request(opt, (res) => {
res.setEncoding('utf-8'); res.setEncoding('utf-8');
let tmp = ''; let tmp = '';
res.on('error', reject); res.on('error', reject);
res.on('data', d => tmp += d); res.on('data', d => tmp += d);
res.on('end', () => resolve(tmp)); res.on('end',() => resolve(tmp));
}); });
req.on('error', reject); req.on('error', reject);
@@ -159,7 +82,7 @@ function SetShareCodesEnv(nameChinese = "", nameConfig = "", envName = "") {
// rawCodeConfig = ini.parse(fs.readFileSync(shareCodeLogPath, 'utf-8')) // rawCodeConfig = ini.parse(fs.readFileSync(shareCodeLogPath, 'utf-8'))
// 使用env模块 // 使用env模块
require('dotenv').config({ path: shareCodeLogPath }) require('dotenv').config({path: shareCodeLogPath})
rawCodeConfig = process.env rawCodeConfig = process.env
} }
@@ -243,7 +166,7 @@ let nameConfig = process.env.ShareCodeConfigName
let envName = process.env.ShareCodeEnvName let envName = process.env.ShareCodeEnvName
if (nameChinese && nameConfig && envName) { if (nameChinese && nameConfig && envName) {
SetShareCodesEnv(nameChinese, nameConfig, envName) SetShareCodesEnv(nameChinese, nameConfig, envName)
} }
function formatdate(date) { function formatdate(date) {
const year = date.getFullYear(); const year = date.getFullYear();
const month = ('0' + (date.getMonth() + 1)).slice(-2); const month = ('0' + (date.getMonth() + 1)).slice(-2);
-7
View File
File diff suppressed because one or more lines are too long
+2 -2
View File
@@ -23,7 +23,7 @@ const api = got.extend({
let ShowSuccess = "false", let ShowSuccess = "false",
CKAlwaysNotify = "false", CKAlwaysNotify = "false",
CKAutoEnable = "false", CKAutoEnable = "true",
NoWarnError = "false"; NoWarnError = "false";
let MessageUserGp2 = ""; let MessageUserGp2 = "";
@@ -136,7 +136,7 @@ if ($.isNode() && process.env.CHECKCK_ALLNOTIFY) {
}); });
return; return;
} }
$.log(`\n默认不自动启用CK,开启变量CHECKCK_CKAUTOENABLE='true'`);
for (let i = 0; i < envs.length; i++) { for (let i = 0; i < envs.length; i++) {
if (envs[i].value) { if (envs[i].value) {
var tempid=0; var tempid=0;
-7
View File
File diff suppressed because one or more lines are too long
+283
View File
File diff suppressed because one or more lines are too long
+2592 -3
View File
File diff suppressed because one or more lines are too long
+766 -4
View File
File diff suppressed because one or more lines are too long
+1 -4
View File
@@ -114,10 +114,7 @@ async function bean() {
} }
} }
} else { } else {
// 完全无数据时才抛出异常,否则返回之前统计出来的数据 $.errorMsg = `数据异常`;
if (!todayArr.length && !yesterdayArr.length) {
$.errorMsg = `数据异常`;
}
// $.msg($.name, ``, `账号${$.index}${$.nickName}\n${$.errorMsg}`); // $.msg($.name, ``, `账号${$.index}${$.nickName}\n${$.errorMsg}`);
t = 1; t = 1;
} }
+15 -36
View File
@@ -1,19 +1,18 @@
# !/usr/bin/env python3 # !/usr/bin/env python3
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Modify : 2024/4/21 # Modify : 2022/9/30
# 京豆近7天输出表格统计 # 京豆近7天输出表格统计
# 用不着每天跑,定时自行设置吧,配合desi可指定账号 # 用不着每天跑,定时自行设置吧,配合desi可指定账号
# https://raw.githubusercontent.com/6dylan6/jdpro/main/jd_beans_7days.py # https://raw.githubusercontent.com/6dylan6/jdpro/main/jd_beans_7days.py
''' '''
new Env('豆子7天统计'); new Env('豆子7天统计');
8 8 29 2 * jd_beans_7days.py 8 8 30 9 * jd_beans_7days.py
''' '''
import requests import requests
import datetime import datetime
import random
import os,re,sys,json,time import os,re,sys,json,time
from urllib.parse import unquote,quote from urllib.parse import unquote
from datetime import timedelta from datetime import timedelta
from datetime import timezone from datetime import timezone
@@ -32,23 +31,7 @@ session = requests.session()
session.keep_alive = False session.keep_alive = False
url = "https://api.m.jd.com/api" url = "https://api.m.jd.com/api"
def getua():
global uuid,addressid,iosVer,iosV,clientVersion,iPhone,area,ADID,lng,lat
uuid=''.join(random.sample(['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','0','1','2','3','4','5','6','7','8','9','a','b','c','z'], 40))
addressid = ''.join(random.sample('1234567898647', 10))
iosVer = ''.join(random.sample(["15.1.1","14.5.1", "14.4", "14.3", "14.2", "14.1", "14.0.1"], 1))
iosV = iosVer.replace('.', '_')
clientVersion=''.join(random.sample(["10.3.0", "10.2.7", "10.2.4"], 1))
iPhone = ''.join(random.sample(["8", "9", "10", "11", "12", "13"], 1))
area=''.join(random.sample('0123456789', 2)) + '_' + ''.join(random.sample('0123456789', 4)) + '_' + ''.join(random.sample('0123456789', 5)) + '_' + ''.join(random.sample('0123456789', 4))
ADID = ''.join(random.sample('0987654321ABCDEF', 8)) + '-' + ''.join(random.sample('0987654321ABCDEF', 4)) + '-' + ''.join(random.sample('0987654321ABCDEF', 4)) + '-' + ''.join(random.sample('0987654321ABCDEF', 4)) + '-' + ''.join(random.sample('0987654321ABCDEF', 12))
lng='119.31991256596'+str(random.randint(100,999))
lat='26.1187118976'+str(random.randint(100,999))
UserAgent=''
if not UserAgent:
return f'jdapp;iPhone;10.0.4;{iosVer};{uuid};network/wifi;ADID/{ADID};model/iPhone{iPhone},1;addressid/{addressid};appBuild/167707;jdSupportDarkMode/0;Mozilla/5.0 (iPhone; CPU iPhone OS {iosV} like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/null;supportJDSHWK/1'
else:
return UserAgent
def gen_body(page): def gen_body(page):
body = { body = {
"beginDate": datetime.datetime.utcnow().replace(tzinfo=timezone.utc).astimezone(SHA_TZ).strftime("%Y-%m-%d %H:%M:%S"), "beginDate": datetime.datetime.utcnow().replace(tzinfo=timezone.utc).astimezone(SHA_TZ).strftime("%Y-%m-%d %H:%M:%S"),
@@ -187,8 +170,8 @@ def get_beans_7days(ck):
day_7 = True day_7 = True
page = 0 page = 0
headers = { headers = {
"Host": "bean.m.jd.com", "Host": "api.m.jd.com",
"User-Agent": getua(), "User-Agent": "Mozilla/5.0 (Linux; Android 10; MI 9 Build/QKQ1.190825.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/78.0.3904.62 XWEB/2797 MMWEBSDK/201201 Mobile Safari/537.36 MMWEBID/7986 MicroMessenger/8.0.1840(0x2800003B) Process/appbrand4 WeChat/arm64 Weixin NetType/4G Language/zh_CN ABI/arm64 MiniProgramEnv/android",
"Content-Type": "application/x-www-form-urlencoded;", "Content-Type": "application/x-www-form-urlencoded;",
"Cookie": ck, "Cookie": ck,
} }
@@ -199,13 +182,11 @@ def get_beans_7days(ck):
beans_out = {key: 0 for key in days} beans_out = {key: 0 for key in days}
while day_7: while day_7:
page = page + 1 page = page + 1
url="https://bean.m.jd.com/beanDetail/detail.json?page="+str(page) url="https://api.m.jd.com/client.action?functionId=getJingBeanBalanceDetail&body=%7B%22pageSize%22%3A%2220%22%2C%22page%22%3A%22"+str(page)+"%22%7D&appid=ld"
data='body='+quote(str({"pageSize":"20","page":str(page)}))+'&appid=ld' resp = session.get(url, headers=headers, timeout=1000).text
resp = session.post(url, headers=headers, data=data ,timeout=1000).text
res = json.loads(resp) res = json.loads(resp)
if res['code'] == '0' : if res['code'] == '0' :
for i in res['jingDetailList']: for i in res['detailList']:
for date in days: for date in days:
if str(date) in i['date'] and int(i['amount']) > 0: if str(date) in i['date'] and int(i['amount']) > 0:
beans_in[str(date)] = beans_in[str(date)] + int(i['amount']) beans_in[str(date)] = beans_in[str(date)] + int(i['amount'])
@@ -218,7 +199,6 @@ def get_beans_7days(ck):
else: else:
print("未获取到数据,原因未知!!\n") print("未获取到数据,原因未知!!\n")
return {'code': 400, 'data': res} return {'code': 400, 'data': res}
#print(beans_in, beans_out, days)
return {'code': 200, 'data': [beans_in, beans_out, days]} return {'code': 200, 'data': [beans_in, beans_out, days]}
except Exception as e: except Exception as e:
print(str(e)) print(str(e))
@@ -228,17 +208,16 @@ def get_beans_7days(ck):
def get_total_beans(ck): def get_total_beans(ck):
try: try:
headers = { headers = {
"Host": "me-api.jd.com", "Host": "wq.jd.com",
"User-Agent": getua(), "User-Agent": "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1",
"Content-Type": "application/x-www-form-urlencoded;", "Content-Type": "application/x-www-form-urlencoded;",
"Cookie": ck, "Cookie": ck,
#"Referer": 'https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2' "Referer": 'https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2'
} }
jurl = "https://me-api.jd.com/user_new/info/GetJDUserInfoUnion" jurl = "https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2"
resp = requests.get(jurl, headers=headers).text resp = requests.post(jurl, headers=headers).text
res = json.loads(resp) res = json.loads(resp)
#print(res) return res['base']['jdNum']
return res['data']['assetInfo']['beanNum']
except Exception as e: except Exception as e:
printf(str(e)) printf(str(e))
-7
View File
File diff suppressed because one or more lines are too long
+18
View File
File diff suppressed because one or more lines are too long
+9
View File
File diff suppressed because one or more lines are too long
+10
View File
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
+302
View File
File diff suppressed because one or more lines are too long
+1288
View File
File diff suppressed because one or more lines are too long
+47 -1
View File
File diff suppressed because one or more lines are too long
+8
View File
File diff suppressed because one or more lines are too long
-6
View File
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
+207
View File
File diff suppressed because one or more lines are too long
-6
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+21
View File
File diff suppressed because one or more lines are too long
+21
View File
File diff suppressed because one or more lines are too long
+21
View File
File diff suppressed because one or more lines are too long
+20
View File
File diff suppressed because one or more lines are too long
+20
View File
File diff suppressed because one or more lines are too long
-5
View File
File diff suppressed because one or more lines are too long
-15
View File
File diff suppressed because one or more lines are too long
-9
View File
File diff suppressed because one or more lines are too long
-25
View File
File diff suppressed because one or more lines are too long
+31
View File
File diff suppressed because one or more lines are too long
+294 -4
View File
File diff suppressed because one or more lines are too long
+8
View File
File diff suppressed because one or more lines are too long
+82
View File
@@ -0,0 +1,82 @@
//20 8 10 4 * jd_farm_automation.js
console.log('默认种2级,如需调整请设置变量 M_JD_FARM_LEVEL\n使用率不高,指定(desi)账号运行\n')
const {Env} = require('./function/magic');
const $ = new Env('农场自动种植兑换');
let level = process.env.M_JD_FARM_LEVEL ? process.env.M_JD_FARM_LEVEL * 1 : 2
$.logic = async function () {
let info = await api('initForFarm',
{"version": 11, "channel": 3, "babelChannel": 0});
if (info.code !== '0') {
$.log('可能没开通农场或者黑透了!!!')
return
}
if (info.farmUserPro.treeState === 1) {
return
}
if (info.farmUserPro.treeState === 2) {
await $.wait(1000, 3000)
$.log(`${info.farmUserPro.name},种植时间:${$.formatDate(
info.farmUserPro.createTime)}`);
//成熟了
let coupon = await api('gotCouponForFarm',
{"version": 11, "channel": 3, "babelChannel": 0});
$.log(coupon)
info = await api('initForFarm',
{"version": 11, "channel": 3, "babelChannel": 0});
}
if (info.farmUserPro.treeState === 3) {
let hongBao = info.myHongBaoInfo.hongBao;
$.putMsg(`已兑换${hongBao.discount}红包,${$.formatDate(hongBao.endTime)}过期`)
}
let element = info.farmLevelWinGoods[level][0] || 0;
await $.wait(1000, 3000)
if (element) {
info = await api('choiceGoodsForFarm', {
"imageUrl": '',
"nickName": '',
"shareCode": '',
"goodsType": element.type,
"type": "0",
"version": 11,
"channel": 3,
"babelChannel": 0
});
if (info.code * 1 === 0) {
$.putMsg(`\n再次种植【${info.farmUserPro.name}`)
}
let a = await api('gotStageAwardForFarm',
{"type": "4", "version": 11, "channel": 3, "babelChannel": 0});
let b = await api('waterGoodForFarm',
{"type": "", "version": 11, "channel": 3, "babelChannel": 0});
let c = await api('gotStageAwardForFarm',
{"type": "1", "version": 11, "channel": 3, "babelChannel": 0});
}else{
$.log('种子已抢完,下次在来!!!\n')
}
};
$.run({wait: [2000, 3000]}).catch(reason => $.log(reason));
// noinspection DuplicatedCode
async function api(fn, body) {
let url = `https://api.m.jd.com/client.action?functionId=${fn}&body=${JSON.stringify(
body)}&client=apple&clientVersion=10.0.4&osVersion=13.7&appid=wh5&loginType=2&loginWQBiz=interact`
//↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓请求头↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓
let headers = {
"Cookie": $.cookie,
"Connection": "keep-alive",
"Accept": "*/*",
"Host": "api.m.jd.com",
'User-Agent': `Mozilla/5.0 (iPhone; CPU iPhone OS 14_5_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 MicroMessenger/8.0.4(0x1800042c) NetType/4G Language/zh_CN miniProgram`,
"Accept-Encoding": "gzip, deflate, br",
"Accept-Language": "zh-cn"
}
let {data} = await $.request(url, headers)
await $.wait(1000, 3000)
return data;
}
+1277
View File
File diff suppressed because one or more lines are too long
+1294
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
-22
View File
File diff suppressed because one or more lines are too long
+21 -9
View File
File diff suppressed because one or more lines are too long
+13
View File
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
+1548
View File
File diff suppressed because one or more lines are too long
-11
View File
File diff suppressed because one or more lines are too long
+10
View File
File diff suppressed because one or more lines are too long
+98
View File
@@ -0,0 +1,98 @@
"""
1 9 11 11 * jd_hbCount.py
const $ = new Env("历史红包统计");
历史红包统计不用定时跑想看手动运行
"""
import requests
import sys
import re
import time
import os
def gettimestamp():
return str(int(time.time() * 1000))
def printf(text):
print(text)
sys.stdout.flush()
def getinfo(ck):
isNext = True
page = 1
sum = 0
usedsum = 0
jxsum = 0
usedjx = 0
litesum = 0
usedlite = 0
healthsum = 0
usedhealth = 0
jdsum = 0
usedjd = 0
tysum = 0
usedty = 0
count = 0
while isNext:
url = "https://wq.jd.com/user/info/QueryUserRedEnvelopesV2?type=2&orgFlag=JD_PinGou_New&page=%s&cashRedType=1&redBalanceFlag=0&channel=3&_=%s&sceneval=2&g_login_type=1&g_ty=ls" % (
page, gettimestamp())
headers = {
'accept': '*/*',
'accept-encoding': 'gzip, deflate, br',
'accept-language': 'zh-CN,zh;q=0.9',
'dnt': '1',
'referer': 'https://wqs.jd.com/',
'sec-fetch-dest': 'script',
'sec-fetch-mode': 'no-cors',
'sec-fetch-site': 'same-site',
'user-agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1',
'cookie': ck
}
r = requests.get(url, headers=headers).json()
if r['data']['unUseRedInfo']['redList'] == None:
print('\n【六个月红包总数】', count, '\n【累计红包总额】%.2f' % sum, '\n【已用红包总额】%.2f' % usedsum)
print(
'\n ↓↓↓↓↓↓明细↓↓↓↓↓↓\n【京东】总额: %.2f, 已用: %.2f\n【京喜】总额: %.2f, 已用: %.2f\n【极速】总额: %.2f, 已用: %.2f\n【健康】总额: %.2f, 已用: %.2f\n【通用】总额: %.2f, 已用: %.2f\n' % (
jdsum, usedjd, jxsum, usedjx, litesum, usedlite, healthsum, usedhealth, tysum, usedty))
isNext = False
else:
page += 1
count = r['data']['unUseRedInfo']['count']
for i in r['data']['unUseRedInfo']['redList']:
sum += float(i['discount'])
usedsum += (float(i['discount']) - float(i['balance']))
if "京喜" in i['orgLimitStr']:
jxsum += float(i['discount'])
usedjx += (float(i['discount']) - float(i['balance']))
elif "极速" in i['orgLimitStr']:
litesum += float(i['discount'])
usedlite += (float(i['discount']) - float(i['balance']))
elif "健康" in i['orgLimitStr']:
healthsum += float(i['discount'])
usedhealth += (float(i['discount']) - float(i['balance']))
elif "京东商城" in i['orgLimitStr']:
jdsum += float(i['discount'])
usedjd += (float(i['discount']) - float(i['balance']))
else:
tysum += float(i['discount'])
usedty += (float(i['discount']) - float(i['balance']))
if __name__ == '__main__':
printf('🔔历史红包统计, 开始!\n')
try:
cks = os.environ["JD_COOKIE"].split("&")
except:
f = open("/jd/config/config.sh", "r", encoding='utf-8')
cks = re.findall(r'Cookie[0-9]*="(pt_key=.*?;pt_pin=.*?;)"', f.read())
f.close()
for ck in cks:
ptpin = re.findall(r"pt_pin=(.*?);", ck)[0]
printf("********开始京东账号" + ptpin + "********")
try:
getinfo(ck)
except:
print("发生异常错误")
+13
View File
File diff suppressed because one or more lines are too long
+11
View File
File diff suppressed because one or more lines are too long
+427
View File
File diff suppressed because one or more lines are too long
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
-8
View File
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
+38
View File
@@ -0,0 +1,38 @@
#!/usr/bin/env bash
#依赖安装,运行一次就好
#0 8 5 5 * jd_indeps.sh
#new Env('依赖安装');
#
npm_ver=`pnpm -v|awk -F. '{print $1}'`
if [[ $npm_ver -ge 7 ]];then
export PNPM_HOME="/root/.local/share/pnpm"
export PATH="$PNPM_HOME:$PATH"
fi
echo -e "安装脚本所需依赖,不一定一次全部安装成功,请自己检查\n"
echo -e "开始安装............\n"
#apk add g++ make pixman-dev pango-dev cairo-dev pkgconf --no-cache
apk add g++ make --no-cache
pnpm config set registry https://registry.npm.taobao.org
pnpm install -g
pnpm install -g ds
pnpm install -g png-js
pnpm install -g date-fns
pnpm install -g axios@0.27.2
pnpm install -g crypto-js
pnpm install -g ts-md5
pnpm install -g tslib
pnpm install -g @types/node
pnpm install -g request
pnpm install -g jsdom
pnpm install -g moment
pnpm install -g cheerio
pnpm install -g tough-cookie
pnpm install -g https-proxy-agent
pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple/ jieba
pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple/ requests
rm -rf /usr/local/pnpm-global/5/node_modules/.pnpm/canvas*
rm -rf /root/.local/share/pnpm/global/5/.pnpm/canvas*
echo -e "\n所需依赖安装完成,请检查有没有报错,可尝试再次运行"
+172
View File
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

Some files were not shown because too many files have changed in this diff Show More