Skip to content

Commit 9aefc1c

Browse files
committed
1 parent 29d0475 commit 9aefc1c

1 file changed

Lines changed: 7 additions & 14 deletions

File tree

Task/txnews.js

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
/*
3-
更新时间: 2021-03-18 15:03
3+
更新时间: 2021-03-19 08:00
44
55
腾讯新闻签到修改版,可以自动阅读文章获取红包,该活动为瓜分百万现金挑战赛,针对幸运用户参与,本脚本已不能自动打开红包,需每天要打开腾讯新闻app一次,请须知
66
@@ -83,6 +83,7 @@ if (isGetCookie) {
8383
console.log(`-------------------------\n\n开始【腾讯新闻账号${$.index}】`)
8484
ID = signurlVal.match(/devid=[a-zA-Z0-9_-]+/g)[0]
8585
token = signurlVal.split("mac")[1]
86+
taskurl = 'http://inews.qq.com/inews/iphone/';
8687
await getsign();
8788
prizeVal?await open():"";
8889
prizeVal?await treesign():"";
@@ -134,12 +135,12 @@ function Host(api, body, taskurl) {
134135
'Accept-Encoding': 'gzip, deflate, br',
135136
'Accept-Language': 'zh-Hans-CN;q=1, en-CN;q=0.9, zh-Hant-CN;q=0.8',
136137
'Connection': 'keep-alive',
137-
'Cookie': cookieVal,
138-
'Host': 'api.inews.qq.com',
138+
'Cookie': cookieVal,
139+
// 'Host': 'api.inews.qq.com',
139140
'Referer': taskurl,
140141
'store': '1',
141142
'devid': ID,
142-
'User-Agent': 'QQNews/6.4.10 (iPhone; iOS 14.2; Scale/3.00)'
143+
'User-Agent': 'QQNews/6.4.40 (iPhone; iOS 14.2; Scale/3.00)'
143144
},
144145
body: body
145146
}
@@ -175,11 +176,7 @@ function open() {
175176
return new Promise((resolve, reject) => {
176177
let url = {
177178
url: prizeVal,
178-
headers: {
179-
Cookie: cookieVal,
180-
'Host': "api.prize.qq.com",
181-
'Content-Type': 'application/x-www-form-urlencoded'
182-
},
179+
headers: Host().headers,
183180
body: "actname=chajian_shouqi"
184181
}
185182
$.post(url, async(error, resp, data) => {
@@ -203,11 +200,7 @@ function treesign() {
203200
treetoken = prizeVal.split("?")[1]
204201
let url = {
205202
url: 'https://api.prize.qq.com/v1/newsapp/tree/sign?'+treetoken,
206-
headers: {
207-
Cookie: cookieVal,
208-
'Host': "api.prize.qq.com",
209-
'Content-Type': 'application/x-www-form-urlencoded'
210-
},
203+
headers: Host().headers,
211204
body: "current_day="+Math.round(new Date(new Date().toLocaleDateString()).getTime()/1000).toString()
212205
}
213206
$.post(url, (error, resp, data) => {

0 commit comments

Comments
 (0)