update
This commit is contained in:
25
jd_zoo.js
25
jd_zoo.js
@@ -92,11 +92,11 @@ if ($.isNode()) {
|
||||
}
|
||||
}
|
||||
let res = [], res2 = [], res3 = [];
|
||||
res3 = await getAuthorShareCode('https://raw.githubusercontent.com/gitupdate/updateTeam/master/shareCodes/jd_zoo.json');
|
||||
if (!res3) await getAuthorShareCode('https://cdn.jsdelivr.net/gh/gitupdate/updateTeam@master/shareCodes/jd_zoo.json')
|
||||
if (new Date().getUTCHours() + 8 >= 17) {
|
||||
res = await getAuthorShareCode() || [];
|
||||
res2 = await getAuthorShareCode('http://cdn.trueorfalse.top/e528ffae31d5407aac83b8c37a4c86bc/') || [];
|
||||
res3 = await getAuthorShareCode('https://raw.githubusercontent.com/gitupdate/updateTeam/master/shareCodes/jd_zoo.json');
|
||||
if (!res3) await getAuthorShareCode('https://cdn.jsdelivr.net/gh/gitupdate/updateTeam@master/shareCodes/jd_zoo.json')
|
||||
}
|
||||
if (pKHelpAuthorFlag) {
|
||||
$.innerPkInviteList = getRandomArrayElements([...$.innerPkInviteList, ...res, ...res2, ...res3], [...$.innerPkInviteList, ...res, ...res2, ...res3].length);
|
||||
@@ -864,9 +864,26 @@ function getRandomArrayElements(arr, count) {
|
||||
}
|
||||
function getAuthorShareCode(url = "http://cdn.annnibb.me/eb6fdc36b281b7d5eabf33396c2683a2.json") {
|
||||
return new Promise(async resolve => {
|
||||
$.get({url,headers:{
|
||||
const options = {
|
||||
"url": `${url}?${new Date()}`,
|
||||
"timeout": 10000,
|
||||
"headers": {
|
||||
"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 Edg/87.0.4280.88"
|
||||
}, "timeout": 10000}, async (err, resp, data) => {
|
||||
}
|
||||
};
|
||||
if ($.isNode() && process.env.TG_PROXY_HOST && process.env.TG_PROXY_PORT) {
|
||||
const tunnel = require("tunnel");
|
||||
const agent = {
|
||||
https: tunnel.httpsOverHttp({
|
||||
proxy: {
|
||||
host: process.env.TG_PROXY_HOST,
|
||||
port: process.env.TG_PROXY_PORT * 1
|
||||
}
|
||||
})
|
||||
}
|
||||
Object.assign(options, { agent })
|
||||
}
|
||||
$.get(options, async (err, resp, data) => {
|
||||
try {
|
||||
if (err) {
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user