-
Notifications
You must be signed in to change notification settings - Fork 9
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
6 changed files
with
103 additions
and
41 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
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
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "ql-ikuuu", | ||
"version": "1.2.0", | ||
"version": "1.3.0", | ||
"private": "true", | ||
"description": "iKuuu VPN 签到、今日流量", | ||
"author": "Zhu Bei <[email protected]>", | ||
|
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,8 +1,25 @@ | ||
const { getCookie, getTraffic } = require('./utils') | ||
const { getCookie, getTraffic, getEmailAndPwdList } = require('./utils') | ||
const notify = require('./sendNotify'); | ||
|
||
(async () => { | ||
const cookie = await getCookie() | ||
const arr = await getTraffic(cookie) | ||
await notify.sendNotify(`iKuuu VPN 今日流量统计`, arr.join('\n')) | ||
})() | ||
async function run() { | ||
const [emailList, pwdList] = await getEmailAndPwdList() | ||
const messages = [] | ||
for (let i = 0; i < emailList.length; i++) { | ||
const email = emailList[i] | ||
const pwd = pwdList[i] | ||
let msg = `邮箱:${emailList[i]}` | ||
const cookie = await getCookie(email, pwd) | ||
if (cookie.includes('登录失败')) { | ||
msg += `\n${cookie}` | ||
messages.push(msg) | ||
continue | ||
} | ||
const arr = await getTraffic(cookie) | ||
msg += `\n${arr.join('\n')}` | ||
messages.push(msg) | ||
} | ||
|
||
await notify.sendNotify(`iKuuu VPN 今日流量统计`, messages.join('\n\n========================\n\n')) | ||
} | ||
|
||
run() |
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