Skip to content

Commit 521d367

Browse files
committed
快手通知修复
增加nodejs通知,仅在签到成功时发送通知
1 parent eca5c8a commit 521d367

1 file changed

Lines changed: 16 additions & 16 deletions

File tree

Task/kuaishou.js

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
/*
22
更新时间: 2021-02-21 10:15
3-
赞赏:快手邀请码`774010415`,农妇山泉 -> 有点咸,万分感谢
4-
本脚本仅适用于快手双版本签到,仅支持正式版获取多Cookie,建议使用正式版获取Cookie,点击视频页悬浮红包,或者进入设置,点击"积分兑好礼"即可
5-
3+
赞赏:快手邀请码`774010415`,农妇山泉 -> 有点咸,万分感谢;
4+
本脚本仅适用于快手双版本签到,仅支持正式版获取多Cookie,建议使用正式版获取Cookie,点击视频页悬浮红包,或者进入设置,点击"积分兑好礼"即可;
5+
本脚本仅在签到成功时通知;
66
兼容Nodejs,把获取的Cookie填入KS_TOKEN,多账号用"&"分开
77
*/
88

99
const $ = new Env('快手视频')
1010
let cookieArr = [];
1111
let ks_tokens = $.getdata('cookie_ks');
12+
const notify = $.isNode() ? require('./sendNotify') : '';
1213
const nebulaCash = $.getdata('cash_nebulaks')||"10";
1314
const cashType = $.getdata('tpcash_nebula')||"ALIPAY";
1415

@@ -56,8 +57,15 @@ if (!$.isNode() && ks_tokens.indexOf('&') == -1) {
5657
await formalSign();
5758
if(offici_code !== 100119){
5859
await formalinfo();
59-
}
60-
await showmsg()
60+
};
61+
$.desc = `【正式版】:\n `+offic_info+"\n "+offic_sign +'\n'
62+
$.desc += `【极速版】:\n `+speed_rewards+"\n "+speed_info;
63+
if(offici_code==1){
64+
$.msg($.name+" 昵称:"+nickname,"",$.desc);
65+
await notify.sendNotify($.name+ " " +nickname,$.desc)
66+
} else {
67+
$.log( "~~~~~~~~~~~~~~~~~\n 昵称:" +nickname+"\n"+ $.desc)
68+
}
6169
}
6270
}
6371
})()
@@ -82,7 +90,7 @@ function formalCenter() {
8290
return new Promise((resolve, reject) =>{
8391
$.post(formalHost('lowActive/module/list', '{"bizId":29,"configId":1}'), async(error, resp, data) =>{
8492
let central = JSON.parse(data);
85-
$.log("\n————————————————————\n\n现在开始正式版任务")
93+
$.log("\n----------------------------------------\n\n现在开始正式版任务")
8694
try {
8795
if (central.result == 1) {
8896
for (lists of central.modules) {
@@ -276,10 +284,9 @@ if(nebulaTask.extParam.todayIsSigned==false){
276284
await bdinvet();
277285
}
278286
$.log(nebulaTask.desc+"\n");
279-
280287
}
281-
}
282-
}
288+
}
289+
}
283290
resolve()
284291
})
285292
})
@@ -313,13 +320,6 @@ function nebulaHost(api,body){
313320
}
314321
}
315322

316-
function showmsg() {
317-
$.desc = `【正式版】:\n `+offic_info+"\n "+offic_sign +'\n'
318-
$.desc += `【极速版】:\n `+speed_rewards+"\n "+speed_info
319-
320-
$.msg($.name+" 昵称:"+nickname,$.sub,$.desc)
321-
}
322-
323323
function GetCookie() {
324324
var UA = $request.headers['User-Agent']
325325
if ($request && $request.method != `OPTIONS` && UA.indexOf('ksNebula') > -1) {

0 commit comments

Comments
 (0)