forked from imoki/sign_script
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |