mirror of https://github.com/KingRan/KR.git
parent
93f8d7db1e
commit
4f13ddad92
|
@ -40,6 +40,7 @@ let cookiesArr = [], cookie = '', token = '';
|
||||||
let UA, UAInfo = {};
|
let UA, UAInfo = {};
|
||||||
const randomCount = $.isNode() ? 20 : 3;
|
const randomCount = $.isNode() ? 20 : 3;
|
||||||
$.appId = "92a36";
|
$.appId = "92a36";
|
||||||
|
let lnrun = 0;
|
||||||
function oc(fn, defaultVal) {//optioanl chaining
|
function oc(fn, defaultVal) {//optioanl chaining
|
||||||
try {
|
try {
|
||||||
return fn()
|
return fn()
|
||||||
|
@ -89,14 +90,21 @@ if ($.isNode()) {
|
||||||
$.allTask = []
|
$.allTask = []
|
||||||
$.info = {}
|
$.info = {}
|
||||||
token = await getJxToken()
|
token = await getJxToken()
|
||||||
|
lnrun++;
|
||||||
await cfd();
|
await cfd();
|
||||||
await $.wait(3000);
|
await $.wait(2000);
|
||||||
|
if (lnrun == 10) {
|
||||||
|
console.log(`\n【访问接口次数达到10次,休息半分钟.....】\n`);
|
||||||
|
await $.wait(30 * 1000);
|
||||||
|
lnrun = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let res = await getAuthorShareCode('https://gitee.com/KingRan521/JD-Scripts/raw/master/shareCodes/cfd.json')
|
let res = await getAuthorShareCode('https://gitee.com/KingRan521/JD-Scripts/raw/master/shareCodes/cfd.json')
|
||||||
$.strMyShareIds = [...(res || [])]
|
$.strMyShareIds = [...(res || [])]
|
||||||
await shareCodesFormat()
|
await shareCodesFormat()
|
||||||
for (let i = 0; i < cookiesArr.length; i++) {
|
for (let i = 0; i < cookiesArr.length; i++) {
|
||||||
|
lnrun++;
|
||||||
cookie = cookiesArr[i];
|
cookie = cookiesArr[i];
|
||||||
$.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1])
|
$.UserName = decodeURIComponent(cookie.match(/pt_pin=([^; ]+)(?=;?)/) && cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1])
|
||||||
$.canHelp = true
|
$.canHelp = true
|
||||||
|
@ -117,6 +125,11 @@ if ($.isNode()) {
|
||||||
} else {
|
} else {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
if (lnrun == 5) {
|
||||||
|
console.log(`\n【访问接口次数达到5次,休息半分钟.....】\n`);
|
||||||
|
await $.wait(30 * 1000);
|
||||||
|
lnrun = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
await showMsg();
|
await showMsg();
|
||||||
})()
|
})()
|
||||||
|
@ -1463,7 +1476,7 @@ function shareCodesFormat() {
|
||||||
} else {
|
} else {
|
||||||
$.newShareCodes = [...new Set([...$.shareCodes, ...$.strMyShareIds])];
|
$.newShareCodes = [...new Set([...$.shareCodes, ...$.strMyShareIds])];
|
||||||
}
|
}
|
||||||
console.log(`您将要助力的好友${JSON.stringify($.newShareCodes)}`)
|
console.log(`\n\n您将要助力的好友${JSON.stringify($.newShareCodes)}`)
|
||||||
resolve();
|
resolve();
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue