mirror of
https://github.com/qitoqito/psyduck.git
synced 2026-01-12 04:30:42 +08:00
.
This commit is contained in:
parent
a3b6321937
commit
9abe4de674
@ -14,41 +14,22 @@ export class Main extends Template {
|
||||
}
|
||||
|
||||
async prepare() {
|
||||
// let c = 0
|
||||
// for (let user of this.help) {
|
||||
// let home = await this.curl({
|
||||
// 'url': `https://api.m.jd.com/?functionId=interact_game_home&_=1740844418368`,
|
||||
// 'form': `appid=activities_platform&loginType=2&loginWQBiz=&functionId=interact_game_home&body={}`,
|
||||
// user
|
||||
// }
|
||||
// )
|
||||
// for (let i of this.haskey(home, 'data.assetInfos.bannerInfos')) {
|
||||
// if (i.functionId == 'beanSign') {
|
||||
// c++
|
||||
// this.shareCode({
|
||||
// assignmentId: i.assignmentId,
|
||||
// itemId: i.itemId
|
||||
// })
|
||||
// }
|
||||
// }
|
||||
// if (c) {
|
||||
// break
|
||||
// }
|
||||
// await this.wait(2000)
|
||||
// }
|
||||
}
|
||||
|
||||
async main(p) {
|
||||
let user = p.data.user;
|
||||
let context = p.context;
|
||||
let algo = context.algo || {}
|
||||
let sign = await this.curl({
|
||||
'url': `https://api.m.jd.com/?functionId=interact_game_sign&_=1740844423946`,
|
||||
'form': `appid=activities_platform&loginType=2&loginWQBiz=&functionId=interact_game_sign&body={"encryptAssignmentId":"${context.assignmentId}","itemId":"${context.itemId}"}`,
|
||||
user,
|
||||
algo: {
|
||||
expire: {
|
||||
code: 3
|
||||
}
|
||||
...{
|
||||
expire: {
|
||||
code: 3
|
||||
}
|
||||
}, ...algo
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
@ -26,15 +26,18 @@ export class Main extends Template {
|
||||
async main(p) {
|
||||
let user = p.data.user
|
||||
let context = p.context
|
||||
let algo = context.algo || {}
|
||||
let sign = await this.curl({
|
||||
'url': `https://api.m.jd.com/api`,
|
||||
'form': `functionId=bean_deliverySign_sign&appid=signed_wh5_ihub&body={"activityId":"${context.activityId}"}&rfs=0000&client=apple&uuid=&build=169743&clientVersion=15.0.25&d_model=&osVersion=15.1.1`,
|
||||
user,
|
||||
algo: {
|
||||
expire: {
|
||||
'data.bizCode': -102
|
||||
},
|
||||
appId: 'e88fd'
|
||||
...{
|
||||
expire: {
|
||||
'data.bizCode': -102
|
||||
},
|
||||
appId: 'e88fd'
|
||||
}, ...algo
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
@ -36,6 +36,7 @@ export class Main extends Template {
|
||||
async main(p) {
|
||||
let user = p.data.user;
|
||||
let context = p.context;
|
||||
let algo = context.algo || {}
|
||||
let gift = function(a) {
|
||||
for (let i of this.haskey(a, ['result.result.prizeInfovo', 'result.result.prizeInfovos']) || {}) {
|
||||
if (i.prizeType == 2) {
|
||||
@ -53,10 +54,12 @@ export class Main extends Template {
|
||||
'form': `body={"infoId":"jdhHome_task","channel":"${context.channel}","appKey":"${context.appKey}","encodeId":"${context.encodeId}","imei":"CFFGHFCF","location":{"province":"16","city":"1234","district":"1234","town":"56789"}}`,
|
||||
user,
|
||||
algo: {
|
||||
appId: "8c399",
|
||||
expire: {
|
||||
'result.code': -1
|
||||
}
|
||||
...{
|
||||
appId: "8c399",
|
||||
expire: {
|
||||
'result.code': -1
|
||||
}
|
||||
}, ...algo
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
43
parse/jd/jd_task_sBean.js
Normal file
43
parse/jd/jd_task_sBean.js
Normal file
@ -0,0 +1,43 @@
|
||||
import {Template} from '../../template.js'
|
||||
|
||||
export class Main extends Template {
|
||||
constructor() {
|
||||
super()
|
||||
this.profile = {
|
||||
title: '京东幸运奖励',
|
||||
crontab: 3
|
||||
}
|
||||
}
|
||||
|
||||
async prepare() {
|
||||
}
|
||||
|
||||
async main(p) {
|
||||
let user = p.data.user;
|
||||
let context = p.context;
|
||||
let show = await this.curl({
|
||||
'form': `functionId=secEntryBenefitShow&body={"channelId":"2","actSecTraffic":"1"}&appid=signed_wh5&client=ios&screen=390*844&networkType=wifi&clientVersion=15.0.25&d_model=iPhone13%2C3&osVersion=15.1.1`,
|
||||
user
|
||||
}
|
||||
)
|
||||
if (this.haskey(show, 'data.result.currentTime')) {
|
||||
let s = await this.curl({
|
||||
'form': `functionId=secEntryBenefitReceive&body={"channelId":"2","actSecTraffic":"1"}&appid=signed_wh5&client=ios&screen=390*676&networkType=wifi&clientVersion=15.0.25&d_model=iPhone13%2C3&osVersion=15.1.1`,
|
||||
user
|
||||
}
|
||||
)
|
||||
if (this.haskey(s, 'data.result.awardList')) {
|
||||
p.award(s.data.result.awardList[0].beanNum, 'bean')
|
||||
}
|
||||
p.info.work = true
|
||||
}
|
||||
else if (this.haskey(show, 'data')) {
|
||||
p.info.work = true
|
||||
p.log("没有幸运奖励")
|
||||
}
|
||||
else {
|
||||
p.log("没有幸运奖励")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -22,16 +22,19 @@ export class Main extends Template {
|
||||
async main(p) {
|
||||
let user = p.data.user;
|
||||
let context = p.context;
|
||||
let algo = context.algo || {}
|
||||
let s = await this.curl({
|
||||
'url': `https://api.m.jd.com/client.action`,
|
||||
'form': `functionId=sign&body={"vendorId":"${context.vendorId}","sourceRpc":"shop_app_sign_home"}&client=apple&clientVersion=15.0.1`,
|
||||
user,
|
||||
algo: {
|
||||
app: true,
|
||||
expire: {
|
||||
'code': '1',
|
||||
status: true
|
||||
}
|
||||
...{
|
||||
app: true,
|
||||
expire: {
|
||||
'code': '1',
|
||||
status: true
|
||||
}
|
||||
}, ...algo
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
@ -70,6 +70,7 @@ export class Main extends Template {
|
||||
async main(p) {
|
||||
let user = p.data.user;
|
||||
let context = p.context;
|
||||
let algo = context.algo || {}
|
||||
if (!context.venderId) {
|
||||
p.err("没有获取到该Token的数据,请重试...")
|
||||
p.context.jump = true
|
||||
@ -80,9 +81,11 @@ export class Main extends Template {
|
||||
form: `appid=interCenter_shopSign&loginType=2&functionId=interact_center_shopSign_signCollectGift&body={"token":"${context.token}","venderId":${context.venderId},"activityId":${context.activityId},"type":56,"actionType":7}`,
|
||||
user,
|
||||
algo: {
|
||||
appId: '4da33',
|
||||
version: 'latest',
|
||||
status: true
|
||||
...{
|
||||
appId: '4da33',
|
||||
version: 'latest',
|
||||
status: true
|
||||
}, ...algo
|
||||
},
|
||||
})
|
||||
if (this.haskey(sign, 'code', 402)) {
|
||||
|
||||
@ -19,6 +19,7 @@ export class Main extends Template {
|
||||
async main(p) {
|
||||
let user = p.data.user;
|
||||
let context = p.context;
|
||||
let algo = context.algo || {}
|
||||
p.log("正在签到:", p.context.name)
|
||||
let appid = this.config.appids[this.n % this.config.appids.length]
|
||||
let signIn = await this.curl({
|
||||
@ -32,13 +33,14 @@ export class Main extends Template {
|
||||
})}&sign=11&t=1710422476977`,
|
||||
user,
|
||||
algo: {
|
||||
appId: 'e2224',
|
||||
log: true,
|
||||
// code: ['0']
|
||||
expire: {
|
||||
"subCode": "300"
|
||||
}
|
||||
}
|
||||
...{
|
||||
appId: 'e2224',
|
||||
log: true,
|
||||
expire: {
|
||||
"subCode": "300"
|
||||
}
|
||||
}, ...algo
|
||||
},
|
||||
}
|
||||
)
|
||||
let subCode = this.haskey(signIn, 'subCode')
|
||||
|
||||
Loading…
Reference in New Issue
Block a user