Skip to content

Commit 5a950ed

Browse files
author
Leaf
committed
适配天气新版本8.3.9,增加几个时段奖励领取
1 parent dee4ed2 commit 5a950ed

7 files changed

Lines changed: 192 additions & 33 deletions

File tree

‎jctq/jctq_daily.js‎

Lines changed: 112 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
/*
2-
安卓:晶彩天气(v8.3.7)
2+
安卓:水果天气(v8.3.9)
33
44
此脚本负责:
5-
领转发页定时宝箱,领福利页定时宝箱,领首页气泡红包,时段转发,刷福利视频,抽奖5次
5+
旧版本8.3.7:领首页气泡红包和翻倍奖励,福利页定时宝箱和翻倍奖励
6+
新版本8.3.9:领转发页定时宝箱,领资讯页宝箱和视频奖励,任务页一键收金币,时段转发,刷福利视频,抽奖5次
67
*/
78

89
const jsname = '晶彩天气日常'
@@ -21,10 +22,14 @@ let userCookie = ''
2122
let jctqCookie = ($.isNode() ? process.env.jctqCookie : $.getdata('jctqCookie')) || '';
2223
let jctqBubbleBody = ($.isNode() ? process.env.jctqBubbleBody : $.getdata('jctqBubbleBody')) || '';
2324
let jctqGiveBoxBody = ($.isNode() ? process.env.jctqGiveBoxBody : $.getdata('jctqGiveBoxBody')) || '';
25+
let jctqGoldBody = ($.isNode() ? process.env.jctqGoldBody : $.getdata('jctqGoldBody')) || '';
26+
let jctqVideoBody = ($.isNode() ? process.env.jctqVideoBody : $.getdata('jctqVideoBody')) || '';
2427

2528
let jctqCookieArr = []
2629
let jctqBubbleBodyArr = []
2730
let jctqGiveBoxBodyArr = []
31+
let jctqGoldBodyArr = []
32+
let jctqVideoBodyArr = []
2833

2934
let refHotShare = 'http://tq.xunsl.com/h5/hotShare/?'
3035
let refRotory = 'https://tq.xunsl.com/html/rotaryTable/index.html?keyword_wyq=woyaoq.com&'
@@ -58,6 +63,12 @@ let refRotory = 'https://tq.xunsl.com/html/rotaryTable/index.html?keyword_wyq=wo
5863
await queryBubbleStatus()
5964
await $.wait(1000)
6065

66+
await getVideoReward()
67+
await $.wait(1000)
68+
69+
await giveGoldCoin()
70+
await $.wait(1000)
71+
6172
await getTaskListByWeather()
6273
await $.wait(1000)
6374

@@ -121,6 +132,28 @@ async function checkEnv() {
121132
jctqGiveBoxBodyArr.push(jctqGiveBoxBody)
122133
}
123134
}
135+
136+
if(jctqGoldBody) {
137+
if(jctqGoldBody.indexOf('&') > -1) {
138+
let jctqGoldBodyArrs = jctqGoldBody.split('&')
139+
for(let i=0; i<jctqGoldBodyArrs.length; i++) {
140+
jctqGoldBodyArr.push(jctqGoldBodyArrs[i])
141+
}
142+
} else {
143+
jctqGoldBodyArr.push(jctqGoldBody)
144+
}
145+
}
146+
147+
if(jctqVideoBody) {
148+
if(jctqVideoBody.indexOf('@') > -1) {
149+
let jctqVideoBodyArrs = jctqVideoBody.split('@')
150+
for(let i=0; i<jctqVideoBodyArrs.length; i++) {
151+
jctqVideoBodyArr.push(jctqVideoBodyArrs[i])
152+
}
153+
} else {
154+
jctqVideoBodyArr.push(jctqVideoBody)
155+
}
156+
}
124157
}
125158

126159
function replaceCookie(jctqCookieItem) {
@@ -131,7 +164,7 @@ function replaceCookie(jctqCookieItem) {
131164
jctqCookieItem = jctqCookieItem.replace(/zqkey_id=/, "cookie_id=")
132165
}
133166
if(jctqCookieItem.indexOf('app_version=') == -1) {
134-
jctqCookieItem = 'app_version=8.3.7&' + jctqCookieItem
167+
jctqCookieItem = 'app_version=8.3.9&' + jctqCookieItem
135168
}
136169
return jctqCookieItem
137170
}
@@ -496,6 +529,82 @@ async function recordVideoNum() {
496529
console.log(`刷福利视频失败`)
497530
}
498531
}
532+
533+
//领取资讯页宝箱
534+
async function getVideoReward() {
535+
let numBody = jctqVideoBodyArr.length
536+
if(numBody > 0) {
537+
console.log(`\n找到${numBody}个资讯页宝箱body,开始尝试领取`)
538+
for(let i=0; i<numBody; i++) {
539+
let videoBody = jctqVideoBodyArr[i]
540+
await $.wait(500)
541+
await getVideoCallback(videoBody)
542+
}
543+
} else {
544+
console.log(`\n没有找到资讯页宝箱body,如果需要请手动领取奖励获取body`)
545+
}
546+
}
547+
548+
//资讯页宝箱
549+
async function getVideoCallback(body) {
550+
let caller = printCaller()
551+
let url = 'https://tq.xunsl.com/v17/Rvideo/videoCallback.json'
552+
let urlObject = populatePostUrl(url,refHotShare,body)
553+
let token = ''
554+
if(body.indexOf('token=') > -1) {
555+
token = body.match(/\&token=([\w\.-_]+)/)[1]
556+
}
557+
urlObject.headers['Token'] = token
558+
await httpPost(urlObject,caller)
559+
let result = httpResult;
560+
if(!result) return
561+
562+
if(result.success == true) {
563+
console.log(`领取资讯页宝箱获得:${result.items.dialog.score}金币`)
564+
} else {
565+
console.log(`领取资讯页宝箱失败:${result.message}`)
566+
}
567+
}
568+
569+
//一键收金币
570+
async function giveGoldCoin() {
571+
let numBody = jctqGoldBodyArr.length
572+
if(numBody > 0) {
573+
console.log(`\n找到${numBody}个收金币body,开始尝试领取`)
574+
for(let i=0; i<numBody; i++) {
575+
let goldBody = jctqGoldBodyArr[i]
576+
await $.wait(500)
577+
await giveReceiveGoldCoin(goldBody)
578+
if(i != numBody-1) {
579+
let randomTime = Math.floor(Math.random()*2000)+32000
580+
console.log(`\n随机延迟${randomTime}ms后尝试领取下一个`)
581+
await $.wait(randomTime)
582+
}
583+
}
584+
} else {
585+
console.log(`\n没有找到收金币body,如果需要请手动领取奖励获取body`)
586+
}
587+
}
588+
589+
//收金币接口
590+
async function giveReceiveGoldCoin(body) {
591+
let caller = printCaller()
592+
let url = 'https://tq.xunsl.com/v5/Weather/giveReceiveGoldCoin.json'
593+
let urlObject = populatePostUrl(url,refHotShare,body)
594+
await httpPost(urlObject,caller)
595+
let result = httpResult;
596+
if(!result) return
597+
598+
if(result.status == 1) {
599+
console.log(`一键收金币获得:${result.items.score}金币`)
600+
} else {
601+
let msg = ''
602+
if(result.message && Array.isArray(result.message)) {
603+
for(let msgItem of result.message) msg += (msgItem+' ')
604+
}
605+
console.log(`一键收金币(部分成功也会显示失败):${msg}`)
606+
}
607+
}
499608
////////////////////////////////////////////////////////////////////
500609
function populatePostUrl(url,referer,reqBody){
501610
let rndtime = Math.floor(new Date().getTime()/1000)

‎jctq/jctq_kkz.js‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
/*
2-
安卓:晶彩天气(v8.3.7)
2+
安卓:水果天气(v8.3.9)
33
44
此脚本负责:
5-
完成看看赚任务,删除重复和失效的body
5+
完成看看赚任务
66
*/
77

8-
const jsname = '晶彩天气看看赚'
8+
const jsname = '水果天气看看赚'
99
const $ = Env(jsname)
1010
const notifyFlag = 1; //0为关闭通知,1为打开通知,默认为1
1111
const logDebug = 0
@@ -119,7 +119,7 @@ function replaceCookie(jctqCookieItem) {
119119
jctqCookieItem = jctqCookieItem.replace(/zqkey_id=/, "cookie_id=")
120120
}
121121
if(jctqCookieItem.indexOf('app_version=') == -1) {
122-
jctqCookieItem = 'app_version=8.3.7&' + jctqCookieItem
122+
jctqCookieItem = 'app_version=8.3.9&' + jctqCookieItem
123123
}
124124
return jctqCookieItem
125125
}

‎jctq/jctq_read.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
/*
2-
安卓:晶彩天气(v8.3.7)
2+
安卓:水果天气(v8.3.9)
33
44
此脚本负责:
55
阅读文章,浏览视频
66
*/
77

8-
const jsname = '晶彩天气文章视频'
8+
const jsname = '水果天气文章视频'
99
const $ = Env(jsname)
1010
const notifyFlag = 1; //0为关闭通知,1为打开通知,默认为1
1111
const logDebug = 0

‎jctq/jctq_reward.js‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
/*
2-
安卓:晶彩天气(v8.3.7)
2+
安卓:水果天气(v8.3.9)
33
44
此脚本负责:
5-
签到和翻倍,任务奖励领取,统计今日收益,自动提现
5+
签到和翻倍,任务奖励领取,领首页福利视频奖励,首页统计今日收益,自动提现
66
77
请将定时放在看看赚和阅读任务后面
88
如果不想自动提现的,请不要捉提现body,或者新建环境变量jctqWithdrawFlag,写成0
99
*/
1010

11-
const jsname = '晶彩天气任务签到'
11+
const jsname = '水果天气任务签到'
1212
const $ = Env(jsname)
1313
const notifyFlag = 1; //0为关闭通知,1为打开通知,默认为1
1414
const logDebug = 0
@@ -180,7 +180,7 @@ function replaceCookie(jctqCookieItem) {
180180
jctqCookieItem = jctqCookieItem.replace(/zqkey_id=/, "cookie_id=")
181181
}
182182
if(jctqCookieItem.indexOf('app_version=') == -1) {
183-
jctqCookieItem = 'app_version=8.3.7&' + jctqCookieItem
183+
jctqCookieItem = 'app_version=8.3.9&' + jctqCookieItem
184184
}
185185
return jctqCookieItem
186186
}

‎jctq/jctq_rewrite.js‎

Lines changed: 57 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,28 @@
11
/*
2-
安卓:晶彩天气(v8.3.7)
2+
安卓:水果天气(v8.3.9)
33
44
此脚本负责:捉包重写
55
66
脚本会自动提现,如果不想自动提现的,请不要捉提现body,或者新建环境变量jctqWithdrawFlag,写成0
77
88
重写:
9-
https://tq.xunsl.com/v17/NewTask/getTaskListByWeather.json -- 点开福利页即可获取jctqCookie
10-
https://tq.xunsl.com/v5/CommonReward/toGetReward.json -- 签到,和福利页任务奖励(目前应该只有激励视频和20篇文章的奖励),获取完建议关掉重写
9+
https://tq.xunsl.com/v17/NewTask/getTaskListByWeather.json -- 点开任务页即可获取jctqCookie
10+
https://tq.xunsl.com/v5/CommonReward/toGetReward.json -- 领取签到和任务奖励后获取。首页左方点击福利视频浮窗(一共5次,建议捉到第一个后复制4遍)。获取完建议关掉重写
1111
https://tq.xunsl.com/v5/article/info.json -- 点开文章获取文章body,获取完建议关掉重写
1212
https://tq.xunsl.com/v5/article/detail.json -- 点开视频获取视频body,获取完建议关掉重写
13-
https://tq.xunsl.com/v5/user/stay.json -- 阅读文章或者看视频一段时间后可以获取到时长body,获取完务必关掉重写
14-
https://tq.xunsl.com/v5/nameless/adlickstart.json -- 点开看看赚获取body,可以一直开着,脚本会自动删除重复和失效body
15-
https://tq.xunsl.com/v5/Weather/giveBoxOnWeather.json -- 点开福利页浮窗宝箱和观看翻倍视频获取body,获取完建议关掉重写
16-
https://tq.xunsl.com/v5/weather/giveTimeInterval.json -- 点开首页气泡红包和观看翻倍视频获取body,获取完建议关掉重写
13+
https://tq.xunsl.com/v5/user/stay.json -- 阅读文章或者看视频一段时间后可以获取到时长body,获取完务必关掉重写,同一个账号不要获取多个时长body
14+
https://tq.xunsl.com/v5/nameless/adlickstart.json -- 点开看看赚获取body,可以一直开着,看看赚会不定时更新
15+
https://tq.xunsl.com/v5/Weather/giveBoxOnWeather.json -- (旧版8.3.7)点开福利页浮窗宝箱和观看翻倍视频获取body,获取完建议关掉重写
16+
https://tq.xunsl.com/v5/weather/giveTimeInterval.json -- (旧版8.3.7)点开首页气泡红包和观看翻倍视频获取body,获取完建议关掉重写
17+
https://tq.xunsl.com/v5/Weather/giveReceiveGoldCoin.json -- 任务页点击一键收金币获取第一个body,收金币后看完视频领奖励获取第二个body
18+
https://tq.xunsl.com/v17/Rvideo/videoCallback.json -- 资讯页右上角宝箱,看视频领取奖励后获取
1719
https://tq.xunsl.com/v5/wechat/withdraw2.json -- 提现一次对应金额获取body
1820
https://tq.xunsl.com/v5/CommonReward/toDouble.json -- 领取签到翻倍奖励后可获取
1921
2022
任务:
21-
jctq_daily.js -- 领转发页定时宝箱,领福利页定时宝箱,领首页气泡红包,时段转发,刷福利视频,抽奖5次
22-
jctq_reward.js -- 签到和翻倍,任务奖励领取,统计今日收益,自动提现
23-
jctq_kkz.js -- 完成看看赚任务,删除重复和失效的body
23+
jctq_daily.js -- 各种时段奖励,抽奖,转发
24+
jctq_reward.js -- 签到和翻倍,任务奖励领取,领首页福利视频奖励,首页统计今日收益,自动提现
25+
jctq_kkz.js -- 完成看看赚任务
2426
jctq_read.js -- 阅读文章,浏览视频
2527
2628
*/
@@ -39,6 +41,8 @@ let jctqWithdraw = ($.isNode() ? process.env.jctqWithdraw : $.getdata('jctqWithd
3941
let jctqBubbleBody = ($.isNode() ? process.env.jctqBubbleBody : $.getdata('jctqBubbleBody')) || '';
4042
let jctqGiveBoxBody = ($.isNode() ? process.env.jctqGiveBoxBody : $.getdata('jctqGiveBoxBody')) || '';
4143
let jctqSignDoubleBody = ($.isNode() ? process.env.jctqSignDoubleBody : $.getdata('jctqSignDoubleBody')) || '';
44+
let jctqGoldBody = ($.isNode() ? process.env.jctqGoldBody : $.getdata('jctqGoldBody')) || '';
45+
let jctqVideoBody = ($.isNode() ? process.env.jctqVideoBody : $.getdata('jctqVideoBody')) || '';
4246

4347
///////////////////////////////////////////////////////////////////
4448

@@ -77,7 +81,7 @@ async function getRewrite() {
7781
}
7882
} else {
7983
$.setdata(newCookie, 'jctqCookie');
80-
$.msg(jsname+` 获取第1个jctqCookie成功`)
84+
$.msg(jsname+` 获取第一个jctqCookie成功`)
8185
}
8286
}
8387

@@ -94,7 +98,7 @@ async function getRewrite() {
9498
}
9599
} else {
96100
$.setdata(rBody, 'jctqBoxbody');
97-
$.msg(jsname+` 获取第1个签到/奖励body成功`)
101+
$.msg(jsname+` 获取第一个签到/奖励body成功`)
98102
}
99103
}
100104

@@ -114,7 +118,7 @@ async function getRewrite() {
114118
}
115119
} else {
116120
$.setdata(rBody, 'jctqWzBody');
117-
$.msg(jsname+` 获取第1个文章/视频body成功`)
121+
$.msg(jsname+` 获取第一个文章/视频body成功`)
118122
}
119123
}
120124

@@ -131,7 +135,7 @@ async function getRewrite() {
131135
}
132136
} else {
133137
$.setdata(rBody, 'jctqTimeBody');
134-
$.msg(jsname+` 获取第1个时长body成功`)
138+
$.msg(jsname+` 获取第一个时长body成功`)
135139
}
136140
}
137141

@@ -148,7 +152,7 @@ async function getRewrite() {
148152
}
149153
} else {
150154
$.setdata(rBody, 'jctqLookStartbody');
151-
$.msg(jsname+` 获取第1个看看赚body成功`)
155+
$.msg(jsname+` 获取第一个看看赚body成功`)
152156
}
153157
}
154158

@@ -165,7 +169,7 @@ async function getRewrite() {
165169
}
166170
} else {
167171
$.setdata(rBody, 'jctqWithdraw');
168-
$.msg(jsname+` 获取第1个提现body成功`)
172+
$.msg(jsname+` 获取第一个提现body成功`)
169173
}
170174
}
171175

@@ -182,7 +186,7 @@ async function getRewrite() {
182186
}
183187
} else {
184188
$.setdata(rBody, 'jctqGiveBoxBody');
185-
$.msg(jsname+` 获取第1个福利页宝箱/翻倍body成功`)
189+
$.msg(jsname+` 获取第一个福利页宝箱/翻倍body成功`)
186190
}
187191
}
188192

@@ -199,7 +203,7 @@ async function getRewrite() {
199203
}
200204
} else {
201205
$.setdata(rBody, 'jctqBubbleBody');
202-
$.msg(jsname+` 获取第1个首页气泡/翻倍body成功`)
206+
$.msg(jsname+` 获取第一个首页气泡/翻倍body成功`)
203207
}
204208
}
205209

@@ -216,7 +220,41 @@ async function getRewrite() {
216220
}
217221
} else {
218222
$.setdata(rBody, 'jctqSignDoubleBody');
219-
$.msg(jsname+` 获取第1个签到翻倍body成功`)
223+
$.msg(jsname+` 获取第一个签到翻倍body成功`)
224+
}
225+
}
226+
227+
if($request.url.indexOf('v5/Weather/giveReceiveGoldCoin.json') > -1) {
228+
rBody = $request.body
229+
if(jctqGoldBody) {
230+
if(jctqGoldBody.indexOf(rBody) > -1) {
231+
$.msg(jsname+` 此收金币body已存在,本次跳过`)
232+
} else {
233+
jctqGoldBody = jctqGoldBody + '&' + rBody
234+
$.setdata(jctqGoldBody, 'jctqGoldBody');
235+
bodyList = jctqGoldBody.split('&')
236+
$.msg(jsname+` 获取第${bodyList.length}个收金币body成功`)
237+
}
238+
} else {
239+
$.setdata(rBody, 'jctqGoldBody');
240+
$.msg(jsname+` 获取第一个收金币body成功`)
241+
}
242+
}
243+
244+
if($request.url.indexOf('v17/Rvideo/videoCallback.json') > -1) {
245+
rBody = $request.body
246+
if(jctqVideoBody) {
247+
if(jctqVideoBody.indexOf(rBody) > -1) {
248+
$.msg(jsname+` 此资讯页视频奖励body已存在,本次跳过`)
249+
} else {
250+
jctqVideoBody = jctqVideoBody + '@' + rBody
251+
$.setdata(jctqVideoBody, 'jctqVideoBody');
252+
bodyList = jctqVideoBody.split('@')
253+
$.msg(jsname+` 获取第${bodyList.length}个资讯页视频奖励body成功`)
254+
}
255+
} else {
256+
$.setdata(rBody, 'jctqVideoBody');
257+
$.msg(jsname+` 获取第一个资讯页视频奖励body成功`)
220258
}
221259
}
222260
}

0 commit comments

Comments
 (0)