Skip to content

Commit

Permalink
Create wps_light
Browse files Browse the repository at this point in the history
  • Loading branch information
imoki authored Jul 21, 2023
1 parent a345498 commit b6eb16c
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions wps_light
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
// 推送bark消息
function bark(message){
let bark_push = Application.Range("E"+2).Text
if(bark_push == "是"){
let bark_id = Application.Range("D"+2).Text
let BARK_PUSH = 'https://api.day.app/' + bark_id + "/" + message;
let barkdata = HTTP.get(BARK_PUSH,
{headers:{'Content-Type': 'application/x-www-form-urlencoded'}}
)
barkdata = barkdata.json()
}
}

function sleep(d){
for(var t = Date.now();Date.now() - t <= d;);
}

var message= "【wps轻量版】";
var line = 21; // 默认支持20个账户
for (let i = 2; i <= line; i++){
var cookie = Application.Range("A"+i).Text
var exec = Application.Range("B"+i).Text
if(cookie != "" && exec == "是"){
url = "https://vip.wps.cn/sign/v2"
headers = {
"Cookie": "wps_sid=" + cookie,
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Safari/537.36 Edge/13.10586"
}
data = {
"platform": "8",
"captcha_pos": "137.00431974731889, 36.00431593261568",
"img_witdh": "275.164",
"img_height": "69.184"
}

let resp = HTTP.fetch(url, {
method: "post",
headers: headers,
data: data
})

try{
resp = resp.json()
var result = resp["result"]
var msg = resp["msg"]
message = message + "单元格A" + i + msg + ",签到成功 "
}catch{
message = message + "单元格A" + i + "签到失败 "
}
console.log(resp)
sleep(2000)
}
}

bark(message);

0 comments on commit b6eb16c

Please sign in to comment.