Skip to content

Commit 6b5fb6d

Browse files
authored
Update jukan.js
1 parent a109499 commit 6b5fb6d

1 file changed

Lines changed: 18 additions & 6 deletions

File tree

‎Task/jukan.js‎

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,13 @@ if (typeof $request !== 'undefined') {
7676
cookieval = CookieArr[i]
7777
bodyval = BodyArr[i]
7878
ID = decodeURIComponent(bodyval).match(/"openid" : "\w+"/)
79+
bodys = [bodyval,bodyval.replace(/time%22%20%3A%20%22\d+/, 'cateid%22%20:%20%2253')]
7980
$.index = i + 1;
8081
await getsign();
8182
await userinfo()
83+
for ( readbodyVal of bodys){
8284
await artList()
85+
}
8386
}
8487
}
8588
})()
@@ -139,27 +142,36 @@ function userinfo() {
139142
})
140143
})
141144
}
142-
143-
144145
function artList() {
145146
return new Promise((resolve, reject) =>{
147+
146148
let infourl = {
147149
url: `https://www.xiaodouzhuan.cn/jkd/newmobile/artlist.action`,
148150
headers: {Cookie:cookieval},
149-
body: bodyval
151+
body: readbodyVal
150152
}
153+
//$.log(infourl.body)
151154
$.post(infourl, async(error, resp, data) => {
152155
let get_list = JSON.parse(data)
156+
//$.log( data)
153157
$.log("【开始自动阅读】")
154158
if (get_list.ret == "ok"){
155159
for( lists of get_list.artlist){
156160
if(lists.item_type=="article"){
157161
art_Title = lists.art_title
158162
artid =lists.art_id
159163
screen_Name = lists.screen_name
160-
$.log(" "+art_Title +" -------- <"+screen_Name +">\n ")
164+
$.log("正在阅读文章: "+art_Title +" -------- <"+screen_Name +">\n ")
161165
await readTask(lists.art_id,lists.open_url)
162166
}
167+
if(lists.item_type=="video"){
168+
art_Title = lists.art_title
169+
artid =lists.art_id
170+
screen_Name = lists.screen_name
171+
artvideo = 1
172+
$.log("正在观看视频: "+art_Title +" -------- <"+screen_Name +">\n ")
173+
await readTask(lists.art_id,lists.open_url)
174+
}
163175
}
164176
}
165177
resolve()
@@ -171,9 +183,9 @@ function artList() {
171183
function readTask(artid,readurl) {
172184
return new Promise((resolve, reject) =>{
173185
let rewurl = {
174-
url: readurl,
186+
url: `https://www.xiaodouzhuan.cn/jkd/newmobile/artDetail.action`,
175187
headers: {Cookie:cookieval},
176-
body: `openID=${ID}&articleID=${artid}&ce=iOS&articlevideo=0&event=oa&advCodeRandom=0&isShowAdv=1`
188+
body: `jsondata={ "appid" : "xzwl", "channel" : "IOS-qianzhuan", "psign" : "0cf94b87f584dfc81a87fa74dcb3757f", "appversioncode" : "6006", "time" : "1609293915", "relate" : 1, "requestid" : "1609293912717038", "artid" : "${artid}", "os" : "IOS",${ID}, "apptoken" : "xzwltoken070704", "appversion" : "60.0.6"}`
177189
}
178190
$.post(rewurl, async(error, resp, data) => {
179191
if(resp.statusCode ==200){

0 commit comments

Comments
 (0)