diff --git a/jd_live_redrain.js b/jd_live_redrain.js index d4f50b6f..da77db48 100644 --- a/jd_live_redrain.js +++ b/jd_live_redrain.js @@ -1,7 +1,7 @@ /* 超级直播间红包雨 -下一场直播时间:04月01日 16:00 https://h5.m.jd.com/dev/3pbY8ZuCx4ML99uttZKLHC2QcAMn/live.html?id=3810378 下一场直播时间:04月02日 20:00 https://h5.m.jd.com/dev/3pbY8ZuCx4ML99uttZKLHC2QcAMn/live.html?id=3804885 +下一场直播时间:04月06日 20:00 脚本兼容: Quantumult X, Surge, Loon, JSBox, Node.js ==============Quantumult X============== [task_local] @@ -21,13 +21,13 @@ cron "0,30,31 20-23/1 * * *" script-path=https://gitee.com/lxk0301/jd_scripts/ra const $ = new Env('超级直播间红包雨'); let allMessage = ''; let bodyList = { - "1": { - "url": "https://api.m.jd.com/client.action?functionId=liveActivityV946&uuid=8888888&client=apple&clientVersion=9.4.1&st=1617173270021&sign=dbab3d99be06b010a7b296dea77487f5&sv=110", - "body": "body=%7B%22liveId%22%3A%223810378%22%7D" - }, "2": { - "url": "https://api.m.jd.com/client.action?functionId=liveActivityV946&uuid=8888888&client=apple&clientVersion=9.4.1&st=1617173266040&sign=8161dae063680508aa93aef0cf5473a0&sv=112", + "url": "https://api.m.jd.com/client.action?functionId=liveActivityV946&uuid=8888888&client=apple&clientVersion=9.4.1&st=1617325217027&sign=a164d2ff76cf8d0f32b6f51487b0335f&sv=102", "body": "body=%7B%22liveId%22%3A%223804885%22%7D" + }, + "6": { + "url": "https://api.m.jd.com/client.action?functionId=liveActivityV946&uuid=8888888&client=apple&clientVersion=9.4.1&st=1617325216041&sign=e725cf0ce846f0ad6b0761b3c3c56c42&sv=111", + "body": "body=%7B%22liveId%22%3A%223820176%22%7D" } } let ids = { @@ -54,8 +54,8 @@ const JD_API_HOST = 'https://api.m.jd.com/api'; $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/', {"open-url": "https://bean.m.jd.com/"}); return; } - console.log('下一场直播时间:04月01日 16:00 https://h5.m.jd.com/dev/3pbY8ZuCx4ML99uttZKLHC2QcAMn/live.html?id=3810378\n' + - '下一场直播时间:04月02日 20:00 https://h5.m.jd.com/dev/3pbY8ZuCx4ML99uttZKLHC2QcAMn/live.html?id=3804885') + console.log('下一场直播时间:04月02日 20:00 https://h5.m.jd.com/dev/3pbY8ZuCx4ML99uttZKLHC2QcAMn/live.html?id=3804885\n' + + '下一场直播时间:04月06日 20:00') await getRedRain(); let nowTs = new Date().getTime() @@ -67,7 +67,7 @@ const JD_API_HOST = 'https://api.m.jd.com/api'; $.log(`本地红包雨配置获取成功`) } else{ $.log(`无法从本地读取配置,请检查运行时间(注:非红包雨时间执行出现此提示请忽略!!!!!!!!!!!)`) - $.log(`下一场直播时间:03月30日 20:00\n非红包雨期间出现上面提示请忽略。红包雨期间会正常,此脚本提issue打死!!!!!!!!!!!)`) + $.log(`非红包雨期间出现上面提示请忽略。红包雨期间会正常,此脚本提issue打死!!!!!!!!!!!)`) return } } else{ diff --git a/sendNotify.js b/sendNotify.js index 12f2ab60..20f3abba 100644 --- a/sendNotify.js +++ b/sendNotify.js @@ -134,10 +134,17 @@ if (process.env.PUSH_PLUS_USER) { } //==========================云端环境变量的判断与接收========================= - -async function sendNotify(text, desp, params = {}) { +/** + * 推送通知功能 + * @param text 通知头 + * @param desp 通知体 + * @param params 某些推送通知方式点击弹窗可跳转, 例:{ url: 'https://abc.com' } + * @param author 作者仓库等信息 例:`本脚本免费使用 By:https://gitee.com/lxk0301/jd_docker` + * @returns {Promise} + */ +async function sendNotify(text, desp, params = {}, author = '\n\n本脚本免费使用 By:https://gitee.com/lxk0301/jd_docker') { //提供6种通知 - desp += `\n\n本脚本免费使用 By:https://gitee.com/lxk0301/jd_docker`; + desp += author;//增加作者信息,防止被贩卖等 await Promise.all([ serverNotify(text, desp),//微信server酱 pushPlusNotify(text, desp)//pushplus(推送加)