Merge pull request #308 from shylocks/master

修复直播红包雨
This commit is contained in:
lxk0301
2020-12-12 07:26:24 +08:00
committed by GitHub
3 changed files with 16 additions and 6 deletions

View File

@@ -11,14 +11,14 @@
[task_local]
#京喜工厂
10 * * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_dreamFactory.js, tag=京喜工厂, enabled=true
================Loon==============
[Script]
cron "10 * * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_dreamFactory.js,tag=京喜工厂
===============Surge=================
京喜工厂 = type=cron,cronexp="10 * * * *",wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_dreamFactory.js
============小火箭=========
京喜工厂 = type=cron,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_dreamFactory.js, cronexpr="10 * * * *", timeout=200, enable=true
@@ -1020,6 +1020,11 @@ async function joinLeaderTuan() {
if (!tuanId) continue
await JoinTuan(tuanId);
}
if (!$.tuanIdS) await updateTuanIdsCDN('https://gitee.com/shylocks/updateTeam/raw/main/jd_updateFactoryTuanId.json');
for (let tuanId of $.tuanIdS.tuanIds) {
if (!tuanId) continue
await JoinTuan(tuanId);
}
}
function JoinTuan(tuanId) {
return new Promise((resolve) => {
@@ -1191,7 +1196,10 @@ function updateTuanIds(url = 'https://raw.githubusercontent.com/lxk0301/updateTe
}
function updateTuanIdsCDN(url = 'https://raw.fastgit.org/lxk0301/updateTeam/master/jd_updateFactoryTuanId.json') {
return new Promise(async resolve => {
$.get({url}, (err, resp, data) => {
$.get({url,
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"
}}, (err, resp, data) => {
try {
if (err) {
console.log(`${JSON.stringify(err)}`)