更新萌宠

KingRan 2022-02-24 17:24:54 +08:00
parent cd6c1069a1
commit d6bf69e060
2 changed files with 19 additions and 9 deletions

View File

@ -34,6 +34,7 @@ let notify = $.isNode() ? require('./sendNotify') : '';
const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; const jdCookieNode = $.isNode() ? require('./jdCookie.js') : '';
let newShareCodes = []; let newShareCodes = [];
let NoNeedCodes = []; let NoNeedCodes = [];
let lnrun = 0;
if ($.isNode()) { if ($.isNode()) {
Object.keys(jdCookieNode).forEach((item) => { Object.keys(jdCookieNode).forEach((item) => {
if (jdCookieNode[item]) { if (jdCookieNode[item]) {
@ -79,8 +80,13 @@ console.log(`共${cookiesArr.length}个京东账号\n`);
goodsUrl = ''; goodsUrl = '';
taskInfoKey = []; taskInfoKey = [];
option = {}; option = {};
await jdPet(); lnrun++;
await $.wait(30 * 1000); await jdPet();
if (lnrun == 3) {
console.log(`\n【访问接口次数达到3次休息一分钟.....】\n`);
await $.wait(60 * 1000);
lnrun = 0;
}
} }
} }
if ($.isNode() && allMessage && $.ctrTemp) { if ($.isNode() && allMessage && $.ctrTemp) {

View File

@ -11,17 +11,17 @@
=================================Quantumultx========================= =================================Quantumultx=========================
[task_local] [task_local]
#东东萌宠 #东东萌宠
30 5,18 * * * jd_pet_help.js, tag=东东萌宠, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jdmc.png, enabled=true 30 5,20 * * * jd_pet_help.js, tag=东东萌宠, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jdmc.png, enabled=true
=================================Loon=================================== =================================Loon===================================
[Script] [Script]
cron "30 5,18 * * *" script-path=jd_pet_help.js,tag=东东萌宠 cron "30 5,20 * * *" script-path=jd_pet_help.js,tag=东东萌宠
===================================Surge================================ ===================================Surge================================
东东萌宠 = type=cron,cronexp="30 5,18 * * *",wake-system=1,timeout=3600,script-path=jd_pet_help.js 东东萌宠 = type=cron,cronexp="30 5,20 * * *",wake-system=1,timeout=3600,script-path=jd_pet_help.js
====================================小火箭============================= ====================================小火箭=============================
东东萌宠 = type=cron,script-path=jd_pet_help.js, cronexpr="30 5,18 * * *", timeout=3600, enable=true 东东萌宠 = type=cron,script-path=jd_pet_help.js, cronexpr="30 5,20 * * *", timeout=3600, enable=true
*/ */
const $ = new Env('东东萌宠内部互助'); const $ = new Env('东东萌宠内部互助');
@ -48,7 +48,7 @@ if ($.isNode()) {
let NowHour = new Date().getHours(); let NowHour = new Date().getHours();
let llhelp=true; let llhelp=true;
let lnrun = 0;
console.log(`${cookiesArr.length}个京东账号\n`); console.log(`${cookiesArr.length}个京东账号\n`);
!(async() => { !(async() => {
@ -85,7 +85,7 @@ console.log(`共${cookiesArr.length}个京东账号\n`);
taskInfoKey = []; taskInfoKey = [];
option = {}; option = {};
await GetShareCode(); await GetShareCode();
await $.wait(2 * 1000); await $.wait(3 * 1000);
} }
} }
console.log('\n互助码收集完毕开始执行内部助力...\n'); console.log('\n互助码收集完毕开始执行内部助力...\n');
@ -116,7 +116,11 @@ console.log(`共${cookiesArr.length}个京东账号\n`);
taskInfoKey = []; taskInfoKey = [];
option = {}; option = {};
await jdPet(); await jdPet();
await $.wait(30 * 1000); if (lnrun == 3) {
console.log(`\n【访问接口次数达到3次休息一分钟.....】\n`);
await $.wait(60 * 1000);
lnrun = 0;
}
} }
} }
if ($.isNode() && allMessage && $.ctrTemp) { if ($.isNode() && allMessage && $.ctrTemp) {