Compare commits

..

No commits in common. "0af1e3ac0efa16248c538cb8d17959687d57e5c5" and "3915a066de91883b4c543bfce4cf1b50b7fa7a72" have entirely different histories.

2 changed files with 37 additions and 39 deletions

View File

@ -11,11 +11,9 @@ export class Main extends Template {
}, },
help: 'main', help: 'main',
verify: true, verify: true,
sync: 3, sync: 1,
tempKey: 8640000000, tempKey: 8640000000,
turn: 2, turn: 2
temp: 't6',
readme: "如果没有获取到数据,可能是前面几个号黑号无法获取,请自行设置temp为可运行账号pin",
} }
} }
@ -45,40 +43,40 @@ export class Main extends Template {
}) })
} }
} }
for (let user of this.random(this.temp, 3)) { // for (let user of this.help.slice(0, 3)) {
let html = await this.curl({ // let html = await this.curl({
'url': `https://pro.m.jd.com/mall/active/4Va8jNzzHPqgTUhxwiTn9PHyVZCB/index.html?utm_medium=tuiguang&tttparams=zZ1qguleyJnTGF0IjozOS45NjEwNTQsInVuX2FyZWEiOiIxXzI4MDBfNTU4MzhfMCIsImRMYXQiOiIiLCJwcnN0YXRlIjoiMCIsImFkZHJlc3NJZCI6IjUzODg3NDg3NyIsImxhdCI6IiIsInBvc0xhdCI6MzkuOTYxMDU0LCJwb3NMbmciOjExNi4zMjIwNjEsImdwc19hcmVhIjoiMF8wXzBfMCIsImxuZyI6IiIsInVlbXBzIjoiMC0wLTAiLCJnTG5nIjoxMTYuMzIyMDYxLCJtb2RlbCI6ImlQaG9uZTEzLDMiLCJkTG5nIjoiIn70=&utm_source=kong&cu=true`, // 'url': `https://pro.m.jd.com/mall/active/4Va8jNzzHPqgTUhxwiTn9PHyVZCB/index.html?utm_medium=tuiguang&tttparams=zZ1qguleyJnTGF0IjozOS45NjEwNTQsInVuX2FyZWEiOiIxXzI4MDBfNTU4MzhfMCIsImRMYXQiOiIiLCJwcnN0YXRlIjoiMCIsImFkZHJlc3NJZCI6IjUzODg3NDg3NyIsImxhdCI6IiIsInBvc0xhdCI6MzkuOTYxMDU0LCJwb3NMbmciOjExNi4zMjIwNjEsImdwc19hcmVhIjoiMF8wXzBfMCIsImxuZyI6IiIsInVlbXBzIjoiMC0wLTAiLCJnTG5nIjoxMTYuMzIyMDYxLCJtb2RlbCI6ImlQaG9uZTEzLDMiLCJkTG5nIjoiIn70=&utm_source=kong&cu=true`,
user // user
} // }
) // )
let data = [] // let data = []
for (let content of this.matchAll(/<script>([^\<]+)<\/script>/g, html)) { // for (let content of this.matchAll(/<script>([^\<]+)<\/script>/g, html)) {
if (content && content.includes('__react_data__')) { // if (content && content.includes('__react_data__')) {
var window = {} // var window = {}
eval(content) // eval(content)
for (let i of this.haskey(window, '__react_data__.activityData.floorList')) { // for (let i of this.haskey(window, '__react_data__.activityData.floorList')) {
if (i.template == "SsrCodeTemplate") { // if (i.template == "SsrCodeTemplate") {
data = i // data = i
} // }
} // }
} // }
} // }
if (this.haskey(data, 'providerData.data.result')) { // if (this.haskey(data, 'providerData.data.result')) {
let result = data.providerData.data.result // let result = data.providerData.data.result
if (this.haskey(result, 'roundConfig.roundId')) { // if (this.haskey(result, 'roundConfig.roundId')) {
this.code = result.skuList // this.code = result.skuList
let startTime = new Date(result.roundConfig.roundStartTime).getTime() / 1000; // let startTime = new Date(result.roundConfig.roundStartTime).getTime() / 1000;
let endTime = new Date(result.roundConfig.roundEndTime).getTime() / 1000; // let endTime = new Date(result.roundConfig.roundEndTime).getTime() / 1000;
this.shareCode({ // this.shareCode({
"roundId": result.roundConfig.roundId, // "roundId": result.roundConfig.roundId,
startTime, // startTime,
endTime, // endTime,
title: result.roundConfig.currAwardReserve.title // title: result.roundConfig.currAwardReserve.title
}) // })
} // }
break // break
} // }
} // }
} }
async main(p) { async main(p) {

File diff suppressed because one or more lines are too long