diff --git a/src/main/resources/filter.txt b/src/main/resources/filter.txt index 5e3d584..277974e 100644 --- a/src/main/resources/filter.txt +++ b/src/main/resources/filter.txt @@ -30,6 +30,7 @@ windows 一次性 一片装 一盒 +丁香茶 万向滑轮 万用表 万藓灵 @@ -165,6 +166,7 @@ windows 刷子 刷牙头 刹车油 +刺梨糕 刺激贴 剂 剃须刀配件 @@ -231,6 +233,7 @@ windows 后膜 启动电源 吸奶器 +吸油纸 吸顶灯 告知牌 周岁 @@ -334,6 +337,7 @@ windows 宠物 宣纸 宫颈炎 +宿便 密封条 密封袋 密码锁 @@ -414,10 +418,12 @@ windows 手推车 手提秤 手术刀 +手机充电线 手机卡 手机壳 手机线 手机维修 +手电 手电筒 打包绳 打包袋子 @@ -457,6 +463,7 @@ windows 拉力器 拉力绳 拉柳枪 +拌饭海苔 拐杖 拔毒膏 拨浪鼓 @@ -519,6 +526,7 @@ windows 方向盘套 日历 早教 +晚安茶 替换头 月子 有机肥 @@ -695,6 +703,7 @@ windows 玉米粉 玉米须 玛咖片 +玛咖茶 玩具女孩 玫瑰花茶 玻尿酸 @@ -821,6 +830,7 @@ windows 红包袋 红绳 红花手套 +纤维素 纱窗 纱网 纳米砖 @@ -868,6 +878,7 @@ windows 育苗盘 背心马甲 背膜 +胖大海 胖子 胶囊 胶带 @@ -903,6 +914,7 @@ windows 花萃 苍蝇拍 苍蝇药 +苦荞茶 茗杯 茶具 茶勺 @@ -911,6 +923,7 @@ windows 茶杯 莆田官网 菊粉 +菊花茶 菜罩 菲妮小熊 葛根 @@ -1008,6 +1021,7 @@ windows 酒 酵素 金刚胶 +金属合金 金属探测 金属探测器 金龙鱼 面条挂面 diff --git a/src/main/resources/pay_filter.txt b/src/main/resources/pay_filter.txt index 909608e..41bb3b5 100644 --- a/src/main/resources/pay_filter.txt +++ b/src/main/resources/pay_filter.txt @@ -8,4 +8,14 @@ 老北京炸酱面杂酱面休闲食品韩国拌面方便面速食特产网红面条102g/包 10包 北海牧场 小鲜酪蓝莓味风味发酵乳100g*3杯 0蔗糖酸奶 风味发酵乳 低温酸奶酸牛奶 火山石烤肠纯肉肠地道肠烧烤食材早餐肉食类零食小吃热狗香肠批发 10根1斤原味 -秋梅食小粿特产梅干菜扣肉饼香辣酥饼薄烤饼锅盔小吃零食 秋梅干菜饼原味100g*3只 \ No newline at end of file +秋梅食小粿特产梅干菜扣肉饼香辣酥饼薄烤饼锅盔小吃零食 秋梅干菜饼原味100g*3只 +落花啼春 平安扣吊坠男女情侣款玉石项链阿富汗挂件玉吊坠玉佩 +奇异果嫩肤磨砂沐浴乳 香氛清洁香水沐浴露留香沐浴液 奇异果300ml +Apple苹果耳机线控带麦手机耳机12/13耳塞入耳式XR耳机有线iPhone11Pro/8p多谷米 圆口 3.5mm接口 +【10包】猫村长麦香鸡味块休闲零食大礼包膨化办公室食品200g 【1箱10包】麦香鸡味块200g +精武甜辣鸭翅膀180g办公方便携带休闲卤味零食大礼包送女生网红开袋即食颗粒袋装武汉特产 +福事多 乳酸菌风味面包吐司500g 休闲零食网红孕妇儿童手撕早餐办公室零食箱装节日送礼 +海狸先生 烧烤甜辣虾条虾片4袋 网红零食休闲食品开袋即食小食品 甜辣虾条30g2+烧烤虾片20g2 +泸州老窖股份公司出品 泸州传奇 财兴福旺475ml单瓶装 +泸州老窖股份公司出品 泸州传奇经典系列 财兴福旺475ML单瓶装 +全麦面包代餐吐司切片0脂肪0蔗糖健身粗粮面包片轻食早餐零食整箱装 真全麦0脂肪0蔗糖代餐面包 整箱1 真全麦0脂0蔗糖代餐面包 整箱1斤装(约24片) \ No newline at end of file diff --git a/src/main/resources/test_MoreBean.js b/src/main/resources/test_MoreBean.js index 3d71bdf..f0aa0c1 100644 --- a/src/main/resources/test_MoreBean.js +++ b/src/main/resources/test_MoreBean.js @@ -26,7 +26,7 @@ const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; let jdNotify = true;//是否关闭通知,false打开通知推送,true关闭通知推送 const helpAuthor = false; // 是否帮助作者助力,false打开通知推送,true关闭通知推送 //IOS等用户直接用NobyDa的jd cookie -let cookiesArr = [], cookie = '', message = "" ; +let cookiesArr = [], cookie = '', message = ""; let newShareCodes = [] let roleMap = { "jd_4521b375ebb5d": "锟子怪", @@ -91,6 +91,8 @@ const JD_API_HOST = 'https://api.m.jd.com/'; message += "----\n\n" } + + console.log(message) postToDingTalk(message) message = "[通知] 额外领京豆 \n\n" @@ -111,6 +113,8 @@ const JD_API_HOST = 'https://api.m.jd.com/'; $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') }) .finally(() => { + + console.log(message) postToDingTalk(message) $.done(); }) @@ -362,7 +366,7 @@ function award(source = "home") { data = JSON.parse(data); if (data.data) { that.log(`领奖成功,获得 ${data.data.beanNum} 个京豆`) - message += "" +`领奖成功,获得 ${data.data.beanNum} 个京豆\n` + " \n\n" + message += "" + `领奖成功,获得 ${data.data.beanNum} 个京豆\n` + " \n\n" } else { that.log(`领奖失败,${data.errorMessage}`) diff --git a/src/main/resources/test_getTuanBean.js b/src/main/resources/test_getTuanBean.js index 8b2f0ae..20eaca7 100644 --- a/src/main/resources/test_getTuanBean.js +++ b/src/main/resources/test_getTuanBean.js @@ -71,6 +71,8 @@ const JD_API_HOST = 'https://api.m.jd.com/api'; message += "----\n\n" } + + console.log(message) postToDingTalk(message) message = "[通知] 赚京豆 \n\n" @@ -97,6 +99,8 @@ const JD_API_HOST = 'https://api.m.jd.com/api'; $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') }) .finally(() => { + + console.log(message) postToDingTalk(message) $.done(); }) diff --git a/src/main/resources/test_redPocket.js b/src/main/resources/test_redPocket.js index c022e7f..8c68665 100644 --- a/src/main/resources/test_redPocket.js +++ b/src/main/resources/test_redPocket.js @@ -27,16 +27,16 @@ let cookiesArr = [], cookie = ''; let isLoginInfo = {} let redPacketId = []; let roleMap = { - "jd_4521b375ebb5d": "锟子怪", - "jd_542c10c0222bc": "康子怪", - "jd_66dcb31363ef6": "涛子怪", - "jd_45d917547c763": "跑腿小怪", - "417040678_m": "斌子怪", - "jd_73d88459d908e": "杰杰子", - "381550701lol": "漪漪子", - "jd_4333d5dc1ac5f": "舒楠子", - "jd_66ea783827d30": "军子", - "jd_4311ac0ff4456": "居子" + "jd_4521b375ebb5d": "锟子怪", + "jd_542c10c0222bc": "康子怪", + "jd_66dcb31363ef6": "涛子怪", + "jd_45d917547c763": "跑腿小怪", + "417040678_m": "斌子怪", + "jd_73d88459d908e": "杰杰子", + "381550701lol": "漪漪子", + "jd_4333d5dc1ac5f": "舒楠子", + "jd_66ea783827d30": "军子", + "jd_4311ac0ff4456": "居子" } let dingtalk = "https://oapi.dingtalk.com/robot/send?access_token=d2b6042cb38f0df63e20797c002208d2710104750c18a1dc84d54106a859a3f0" let message = "" @@ -46,7 +46,7 @@ if ($.isNode()) { Object.keys(jdCookieNode).forEach((item) => { cookiesArr.push(jdCookieNode[item]) }) - if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => { }; if (JSON.stringify(process.env).indexOf('GITHUB') > -1) process.exit(0); } else { cookiesArr = [$.getdata('CookieJD'), $.getdata('CookieJD2'), ...jsonParse($.getdata('CookiesJD') || "[]").map(item => item.cookie)].filter(item => !!item); @@ -54,12 +54,12 @@ if ($.isNode()) { const JD_API_HOST = 'https://api.m.jd.com/api'; !(async () => { if (!cookiesArr[0]) { - $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', { "open-url": "https://bean.m.jd.com/bean/signIndex.action" }); return; } let res = await getAuthorShareCode('https://raw.githubusercontent.com/Aaron-lv/updateTeam/master/shareCodes/jd_red.json') if (!res) { - $.http.get({url: 'https://purge.jsdelivr.net/gh/Aaron-lv/updateTeam@master/shareCodes/jd_red.json'}).then((resp) => {}).catch((e) => $.log('刷新CDN异常', e)); + $.http.get({ url: 'https://purge.jsdelivr.net/gh/Aaron-lv/updateTeam@master/shareCodes/jd_red.json' }).then((resp) => { }).catch((e) => $.log('刷新CDN异常', e)); await $.wait(1000) res = await getAuthorShareCode('https://cdn.jsdelivr.net/gh/Aaron-lv/updateTeam@master/shareCodes/jd_red.json') } @@ -79,14 +79,14 @@ const JD_API_HOST = 'https://api.m.jd.com/api'; if (roleMap[username] != undefined) { username = roleMap[username] - } - //加上名称 - message = message + "【羊毛姐妹】" + username + " \n\n " + } + //加上名称 + message = message + "【羊毛姐妹】" + username + " \n\n " console.log(`\n****开始【京东账号${$.index}】${$.nickName || $.UserName}****\n`); if (!$.isLogin) { - $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, { "open-url": "https://bean.m.jd.com/bean/signIndex.action" }); if ($.isNode()) { await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); @@ -100,8 +100,9 @@ const JD_API_HOST = 'https://api.m.jd.com/api'; message += "----\n\n" } + console.log(message) postToDingTalk(message) - message += "[通知] 全民开红包 \n\n" + message = "[通知] 全民开红包 \n\n" for (let i = 0; i < cookiesArr.length; i++) { @@ -115,11 +116,11 @@ const JD_API_HOST = 'https://api.m.jd.com/api'; for (let j = 0; j < redPacketId.length && $.canHelp; j++) { console.log(`账号 ${$.index} ${$.UserName} 开始给 ${redPacketId[j]} 进行助力`) $.max = false; - message += "" +`开始给${redPacketId[j]}助力`+ " \n\n" + message += "" + `开始给${redPacketId[j]}助力` + " \n\n" await jinli_h5assist(redPacketId[j]); await $.wait(2000) if ($.max) { - // $.redPacketId.splice(j, 1) + // $.redPacketId.splice(j, 1) j-- continue } @@ -127,13 +128,15 @@ const JD_API_HOST = 'https://api.m.jd.com/api'; } } })() - .catch((e) => { - $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') - }) - .finally(() => { - postToDingTalk(message) - $.done(); - }) + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + + console.log(message) + postToDingTalk(message) + $.done(); + }) async function redPacket() { try { @@ -184,10 +187,10 @@ function doLuckDrawEntrance() { if (data.code === '0' && data.busiCode === '0') { if (data.result.luckyDrawData.actId) { if (data.result.luckyDrawData.redPacketId) { - message += "" +`券后9.9抽奖获得【红包】:${data.result.luckyDrawData.quota}元` + " \n\n" + message += "" + `券后9.9抽奖获得【红包】:${data.result.luckyDrawData.quota}元` + " \n\n" console.log(`券后9.9抽奖获得【红包】:${data.result.luckyDrawData.quota}元`); } else { - message += "" + `券后9.9抽奖获得【优惠券】:${data.result.luckyDrawData.discount}元:${data.result.luckyDrawData.prizeName},${data.result.luckyDrawData.quotaDesc}` + " \n\n" + message += "" + `券后9.9抽奖获得【优惠券】:${data.result.luckyDrawData.discount}元:${data.result.luckyDrawData.prizeName},${data.result.luckyDrawData.quotaDesc}` + " \n\n" console.log(`券后9.9抽奖获得【优惠券】:${data.result.luckyDrawData.discount}元:${data.result.luckyDrawData.prizeName},${data.result.luckyDrawData.quotaDesc}`); } } else { @@ -210,7 +213,7 @@ async function doTask() { if ($.taskInfo && $.taskInfo.length > 0) { console.log(` 任务 状态 红包是否领取`); for (let item of $.taskInfo) { - console.log(`${item.title.slice(-6)} ${item.alreadyReceivedCount ? item.alreadyReceivedCount: 0}/${item.requireCount} ${item.innerStatus === 4 ? '是':'否'}`) + console.log(`${item.title.slice(-6)} ${item.alreadyReceivedCount ? item.alreadyReceivedCount : 0}/${item.requireCount} ${item.innerStatus === 4 ? '是' : '否'}`) } for (let item of $.taskInfo) { //innerStatus=4已领取红包,3:任务已完成,红包未领取,2:任务已领取,但未完成,7,未领取任务 @@ -281,7 +284,7 @@ async function red() { if (redPacketId1) redPacketId.push(redPacketId1); console.log(`\n\n当前待拆红包ID:${$.h5activityIndex.data.result.redpacketInfo.id},进度:再邀${$.h5activityIndex.data.result.redpacketConfigFillRewardInfo[$.hasSendNumber].requireAssistNum - $.h5activityIndex.data.result.redpacketConfigFillRewardInfo[$.hasSendNumber].hasAssistNum}个好友,开第${$.hasSendNumber + 1}个红包。当前已拆红包:${$.hasSendNumber}个,剩余${$.h5activityIndex.data.result.remainRedpacketNumber}个红包待开,已有${$.assistants}好友助力\n\n`) console.log(`当前可拆红包个数:${$.waitOpenTimes}`) - message += "" +`当前可拆红包个数:${$.waitOpenTimes}` + " \n\n" + message += "" + `当前可拆红包个数:${$.waitOpenTimes}` + " \n\n" if ($.waitOpenTimes > 0) { for (let i = 0; i < $.waitOpenTimes; i++) { await h5receiveRedpacketAll(); @@ -295,7 +298,7 @@ async function red() { //获取任务列表API function taskHomePage() { return new Promise((resolve) => { - $.post(taskUrl(arguments.callee.name.toString(), {"clientInfo":{}}), (err, resp, data) => { + $.post(taskUrl(arguments.callee.name.toString(), { "clientInfo": {} }), (err, resp, data) => { try { if (err) { console.log(`\n${$.name}: API查询请求失败 ‼️‼️`); @@ -314,7 +317,7 @@ function taskHomePage() { //领取任务API,需token function startTask(taskType) { // 从taskHomePage返回的数据里面拿taskType - let data = {taskType}; + let data = { taskType }; data['token'] = $.md5($.md5("j" + JSON.stringify(data) + "D")) return new Promise((resolve) => { $.post(taskUrl(arguments.callee.name.toString(), data), (err, resp, data) => { @@ -359,7 +362,7 @@ async function active(taskType) { //获取具体任务详情API function getTaskDetailForColor(taskType) { - const data = {"clientInfo":{}, taskType}; + const data = { "clientInfo": {}, taskType }; return new Promise((resolve) => { $.post(taskUrl(arguments.callee.name.toString(), data), (err, resp, data) => { try { @@ -380,7 +383,7 @@ function getTaskDetailForColor(taskType) { } //做成任务API function taskReportForColor(taskType, detailId) { - const data = {taskType, detailId}; + const data = { taskType, detailId }; data['token'] = $.md5($.md5("j" + JSON.stringify(data) + "D")) //console.log(`活动id:::${detailId}\n`) return new Promise((resolve) => { @@ -403,7 +406,7 @@ function taskReportForColor(taskType, detailId) { } //领取做完任务后的红包 function receiveTaskRedpacket(taskType) { - const body = {"clientInfo":{}, taskType}; + const body = { "clientInfo": {}, taskType }; return new Promise((resolve) => { $.post(taskUrl('h5receiveRedpacketAll', body), (err, resp, data) => { try { @@ -414,7 +417,7 @@ function receiveTaskRedpacket(taskType) { data = JSON.parse(data); if (data.data.success && data.data.biz_code === 0) { console.log(`红包领取成功,获得${data.data.result.discount}元\n`) - message += "" +`红包领取成功,获得${data.data.result.discount}元\n`+ " \n\n" + message += "" + `红包领取成功,获得${data.data.result.discount}元\n` + " \n\n" $.discount += Number(data.data.result.discount); } } @@ -429,7 +432,7 @@ function receiveTaskRedpacket(taskType) { //助力API function jinli_h5assist(redPacketId) { //一个人一天只能助力两次,助力码redPacketId 每天都变 - const body = {"clientInfo":{},redPacketId,"followShop":0,"promUserState":""}; + const body = { "clientInfo": {}, redPacketId, "followShop": 0, "promUserState": "" }; const options = taskUrl(arguments.callee.name.toString(), body) return new Promise((resolve) => { $.post(options, (err, resp, data) => { @@ -459,7 +462,7 @@ function jinli_h5assist(redPacketId) { } //领取红包API function h5receiveRedpacketAll() { - const options = taskUrl(arguments.callee.name.toString(), {"clientInfo":{}}) + const options = taskUrl(arguments.callee.name.toString(), { "clientInfo": {} }) return new Promise((resolve) => { $.post(options, (err, resp, data) => { try { @@ -469,7 +472,7 @@ function h5receiveRedpacketAll() { } else { data = JSON.parse(data); if (data && data.data && data.data.biz_code === 0) { - message += "" +`拆红包获得:${data.data.result.discount}元`+ " \n\n" + message += "" + `拆红包获得:${data.data.result.discount}元` + " \n\n" console.log(`拆红包获得:${data.data.result.discount}元`) } else { console.log(`领红包失败:${JSON.stringify(data)}`) @@ -485,7 +488,7 @@ function h5receiveRedpacketAll() { } //发起助力红包API function h5launch() { - const body = {"clientInfo":{},"followShop":0,"promUserState":""}; + const body = { "clientInfo": {}, "followShop": 0, "promUserState": "" }; const options = taskUrl(arguments.callee.name.toString(), body) return new Promise((resolve) => { $.post(options, (err, resp, data) => { @@ -515,7 +518,7 @@ function h5launch() { }) } function h5activityIndex() { - const body = {"clientInfo":{},"isjdapp":1}; + const body = { "clientInfo": {}, "isjdapp": 1 }; const options = taskUrl(arguments.callee.name.toString(), body); return new Promise((resolve) => { $.post(options, async (err, resp, data) => { @@ -720,9 +723,9 @@ function jsonParse(str) { } } // md5 -!function(n){function t(n,t){var r=(65535&n)+(65535&t);return(n>>16)+(t>>16)+(r>>16)<<16|65535&r}function r(n,t){return n<>>32-t}function e(n,e,o,u,c,f){return t(r(t(t(e,n),t(u,f)),c),o)}function o(n,t,r,o,u,c,f){return e(t&r|~t&o,n,t,u,c,f)}function u(n,t,r,o,u,c,f){return e(t&o|r&~o,n,t,u,c,f)}function c(n,t,r,o,u,c,f){return e(t^r^o,n,t,u,c,f)}function f(n,t,r,o,u,c,f){return e(r^(t|~o),n,t,u,c,f)}function i(n,r){n[r>>5]|=128<>>9<<4)]=r;var e,i,a,d,h,l=1732584193,g=-271733879,v=-1732584194,m=271733878;for(e=0;e>5]>>>t%32&255)}return r}function d(n){var t,r=[];for(r[(n.length>>2)-1]=void 0,t=0;t>5]|=(255&n.charCodeAt(t/8))<16&&(o=i(o,8*n.length)),r=0;r<16;r+=1){u[r]=909522486^o[r],c[r]=1549556828^o[r]}return e=i(u.concat(d(t)),512+8*t.length),a(i(c.concat(e),640))}function g(n){var t,r,e="";for(r=0;r>>4&15)+"0123456789abcdef".charAt(15&t)}return e}function v(n){return unescape(encodeURIComponent(n))}function m(n){return h(v(n))}function p(n){return g(m(n))}function s(n,t){return l(v(n),v(t))}function C(n,t){return g(s(n,t))}function A(n,t,r){return t?r?s(t,n):C(t,n):r?m(n):p(n)}$.md5=A}(this); +!function (n) { function t(n, t) { var r = (65535 & n) + (65535 & t); return (n >> 16) + (t >> 16) + (r >> 16) << 16 | 65535 & r } function r(n, t) { return n << t | n >>> 32 - t } function e(n, e, o, u, c, f) { return t(r(t(t(e, n), t(u, f)), c), o) } function o(n, t, r, o, u, c, f) { return e(t & r | ~t & o, n, t, u, c, f) } function u(n, t, r, o, u, c, f) { return e(t & o | r & ~o, n, t, u, c, f) } function c(n, t, r, o, u, c, f) { return e(t ^ r ^ o, n, t, u, c, f) } function f(n, t, r, o, u, c, f) { return e(r ^ (t | ~o), n, t, u, c, f) } function i(n, r) { n[r >> 5] |= 128 << r % 32, n[14 + (r + 64 >>> 9 << 4)] = r; var e, i, a, d, h, l = 1732584193, g = -271733879, v = -1732584194, m = 271733878; for (e = 0; e < n.length; e += 16) { i = l, a = g, d = v, h = m, g = f(g = f(g = f(g = f(g = c(g = c(g = c(g = c(g = u(g = u(g = u(g = u(g = o(g = o(g = o(g = o(g, v = o(v, m = o(m, l = o(l, g, v, m, n[e], 7, -680876936), g, v, n[e + 1], 12, -389564586), l, g, n[e + 2], 17, 606105819), m, l, n[e + 3], 22, -1044525330), v = o(v, m = o(m, l = o(l, g, v, m, n[e + 4], 7, -176418897), g, v, n[e + 5], 12, 1200080426), l, g, n[e + 6], 17, -1473231341), m, l, n[e + 7], 22, -45705983), v = o(v, m = o(m, l = o(l, g, v, m, n[e + 8], 7, 1770035416), g, v, n[e + 9], 12, -1958414417), l, g, n[e + 10], 17, -42063), m, l, n[e + 11], 22, -1990404162), v = o(v, m = o(m, l = o(l, g, v, m, n[e + 12], 7, 1804603682), g, v, n[e + 13], 12, -40341101), l, g, n[e + 14], 17, -1502002290), m, l, n[e + 15], 22, 1236535329), v = u(v, m = u(m, l = u(l, g, v, m, n[e + 1], 5, -165796510), g, v, n[e + 6], 9, -1069501632), l, g, n[e + 11], 14, 643717713), m, l, n[e], 20, -373897302), v = u(v, m = u(m, l = u(l, g, v, m, n[e + 5], 5, -701558691), g, v, n[e + 10], 9, 38016083), l, g, n[e + 15], 14, -660478335), m, l, n[e + 4], 20, -405537848), v = u(v, m = u(m, l = u(l, g, v, m, n[e + 9], 5, 568446438), g, v, n[e + 14], 9, -1019803690), l, g, n[e + 3], 14, -187363961), m, l, n[e + 8], 20, 1163531501), v = u(v, m = u(m, l = u(l, g, v, m, n[e + 13], 5, -1444681467), g, v, n[e + 2], 9, -51403784), l, g, n[e + 7], 14, 1735328473), m, l, n[e + 12], 20, -1926607734), v = c(v, m = c(m, l = c(l, g, v, m, n[e + 5], 4, -378558), g, v, n[e + 8], 11, -2022574463), l, g, n[e + 11], 16, 1839030562), m, l, n[e + 14], 23, -35309556), v = c(v, m = c(m, l = c(l, g, v, m, n[e + 1], 4, -1530992060), g, v, n[e + 4], 11, 1272893353), l, g, n[e + 7], 16, -155497632), m, l, n[e + 10], 23, -1094730640), v = c(v, m = c(m, l = c(l, g, v, m, n[e + 13], 4, 681279174), g, v, n[e], 11, -358537222), l, g, n[e + 3], 16, -722521979), m, l, n[e + 6], 23, 76029189), v = c(v, m = c(m, l = c(l, g, v, m, n[e + 9], 4, -640364487), g, v, n[e + 12], 11, -421815835), l, g, n[e + 15], 16, 530742520), m, l, n[e + 2], 23, -995338651), v = f(v, m = f(m, l = f(l, g, v, m, n[e], 6, -198630844), g, v, n[e + 7], 10, 1126891415), l, g, n[e + 14], 15, -1416354905), m, l, n[e + 5], 21, -57434055), v = f(v, m = f(m, l = f(l, g, v, m, n[e + 12], 6, 1700485571), g, v, n[e + 3], 10, -1894986606), l, g, n[e + 10], 15, -1051523), m, l, n[e + 1], 21, -2054922799), v = f(v, m = f(m, l = f(l, g, v, m, n[e + 8], 6, 1873313359), g, v, n[e + 15], 10, -30611744), l, g, n[e + 6], 15, -1560198380), m, l, n[e + 13], 21, 1309151649), v = f(v, m = f(m, l = f(l, g, v, m, n[e + 4], 6, -145523070), g, v, n[e + 11], 10, -1120210379), l, g, n[e + 2], 15, 718787259), m, l, n[e + 9], 21, -343485551), l = t(l, i), g = t(g, a), v = t(v, d), m = t(m, h) } return [l, g, v, m] } function a(n) { var t, r = "", e = 32 * n.length; for (t = 0; t < e; t += 8) { r += String.fromCharCode(n[t >> 5] >>> t % 32 & 255) } return r } function d(n) { var t, r = []; for (r[(n.length >> 2) - 1] = void 0, t = 0; t < r.length; t += 1) { r[t] = 0 } var e = 8 * n.length; for (t = 0; t < e; t += 8) { r[t >> 5] |= (255 & n.charCodeAt(t / 8)) << t % 32 } return r } function h(n) { return a(i(d(n), 8 * n.length)) } function l(n, t) { var r, e, o = d(n), u = [], c = []; for (u[15] = c[15] = void 0, o.length > 16 && (o = i(o, 8 * n.length)), r = 0; r < 16; r += 1) { u[r] = 909522486 ^ o[r], c[r] = 1549556828 ^ o[r] } return e = i(u.concat(d(t)), 512 + 8 * t.length), a(i(c.concat(e), 640)) } function g(n) { var t, r, e = ""; for (r = 0; r < n.length; r += 1) { t = n.charCodeAt(r), e += "0123456789abcdef".charAt(t >>> 4 & 15) + "0123456789abcdef".charAt(15 & t) } return e } function v(n) { return unescape(encodeURIComponent(n)) } function m(n) { return h(v(n)) } function p(n) { return g(m(n)) } function s(n, t) { return l(v(n), v(t)) } function C(n, t) { return g(s(n, t)) } function A(n, t, r) { return t ? r ? s(t, n) : C(t, n) : r ? m(n) : p(n) } $.md5 = A }(this); // prettier-ignore -function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} +function Env(t, e) { "undefined" != typeof process && JSON.stringify(process.env).indexOf("GITHUB") > -1 && process.exit(0); class s { constructor(t) { this.env = t } send(t, e = "GET") { t = "string" == typeof t ? { url: t } : t; let s = this.get; return "POST" === e && (s = this.post), new Promise((e, i) => { s.call(this, t, (t, s, r) => { t ? i(t) : e(s) }) }) } get(t) { return this.send.call(this.env, t) } post(t) { return this.send.call(this.env, t, "POST") } } return new class { constructor(t, e) { this.name = t, this.http = new s(this), this.data = null, this.dataFile = "box.dat", this.logs = [], this.isMute = !1, this.isNeedRewrite = !1, this.logSeparator = "\n", this.startTime = (new Date).getTime(), Object.assign(this, e), this.log("", `🔔${this.name}, 开始!`) } isNode() { return "undefined" != typeof module && !!module.exports } isQuanX() { return "undefined" != typeof $task } isSurge() { return "undefined" != typeof $httpClient && "undefined" == typeof $loon } isLoon() { return "undefined" != typeof $loon } toObj(t, e = null) { try { return JSON.parse(t) } catch { return e } } toStr(t, e = null) { try { return JSON.stringify(t) } catch { return e } } getjson(t, e) { let s = e; const i = this.getdata(t); if (i) try { s = JSON.parse(this.getdata(t)) } catch { } return s } setjson(t, e) { try { return this.setdata(JSON.stringify(t), e) } catch { return !1 } } getScript(t) { return new Promise(e => { this.get({ url: t }, (t, s, i) => e(i)) }) } runScript(t, e) { return new Promise(s => { let i = this.getdata("@chavy_boxjs_userCfgs.httpapi"); i = i ? i.replace(/\n/g, "").trim() : i; let r = this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout"); r = r ? 1 * r : 20, r = e && e.timeout ? e.timeout : r; const [o, h] = i.split("@"), n = { url: `http://${h}/v1/scripting/evaluate`, body: { script_text: t, mock_type: "cron", timeout: r }, headers: { "X-Key": o, Accept: "*/*" } }; this.post(n, (t, e, i) => s(i)) }).catch(t => this.logErr(t)) } loaddata() { if (!this.isNode()) return {}; { this.fs = this.fs ? this.fs : require("fs"), this.path = this.path ? this.path : require("path"); const t = this.path.resolve(this.dataFile), e = this.path.resolve(process.cwd(), this.dataFile), s = this.fs.existsSync(t), i = !s && this.fs.existsSync(e); if (!s && !i) return {}; { const i = s ? t : e; try { return JSON.parse(this.fs.readFileSync(i)) } catch (t) { return {} } } } } writedata() { if (this.isNode()) { this.fs = this.fs ? this.fs : require("fs"), this.path = this.path ? this.path : require("path"); const t = this.path.resolve(this.dataFile), e = this.path.resolve(process.cwd(), this.dataFile), s = this.fs.existsSync(t), i = !s && this.fs.existsSync(e), r = JSON.stringify(this.data); s ? this.fs.writeFileSync(t, r) : i ? this.fs.writeFileSync(e, r) : this.fs.writeFileSync(t, r) } } lodash_get(t, e, s) { const i = e.replace(/\[(\d+)\]/g, ".$1").split("."); let r = t; for (const t of i) if (r = Object(r)[t], void 0 === r) return s; return r } lodash_set(t, e, s) { return Object(t) !== t ? t : (Array.isArray(e) || (e = e.toString().match(/[^.[\]]+/g) || []), e.slice(0, -1).reduce((t, s, i) => Object(t[s]) === t[s] ? t[s] : t[s] = Math.abs(e[i + 1]) >> 0 == +e[i + 1] ? [] : {}, t)[e[e.length - 1]] = s, t) } getdata(t) { let e = this.getval(t); if (/^@/.test(t)) { const [, s, i] = /^@(.*?)\.(.*?)$/.exec(t), r = s ? this.getval(s) : ""; if (r) try { const t = JSON.parse(r); e = t ? this.lodash_get(t, i, "") : e } catch (t) { e = "" } } return e } setdata(t, e) { let s = !1; if (/^@/.test(e)) { const [, i, r] = /^@(.*?)\.(.*?)$/.exec(e), o = this.getval(i), h = i ? "null" === o ? null : o || "{}" : "{}"; try { const e = JSON.parse(h); this.lodash_set(e, r, t), s = this.setval(JSON.stringify(e), i) } catch (e) { const o = {}; this.lodash_set(o, r, t), s = this.setval(JSON.stringify(o), i) } } else s = this.setval(t, e); return s } getval(t) { return this.isSurge() || this.isLoon() ? $persistentStore.read(t) : this.isQuanX() ? $prefs.valueForKey(t) : this.isNode() ? (this.data = this.loaddata(), this.data[t]) : this.data && this.data[t] || null } setval(t, e) { return this.isSurge() || this.isLoon() ? $persistentStore.write(t, e) : this.isQuanX() ? $prefs.setValueForKey(t, e) : this.isNode() ? (this.data = this.loaddata(), this.data[e] = t, this.writedata(), !0) : this.data && this.data[e] || null } initGotEnv(t) { this.got = this.got ? this.got : require("got"), this.cktough = this.cktough ? this.cktough : require("tough-cookie"), this.ckjar = this.ckjar ? this.ckjar : new this.cktough.CookieJar, t && (t.headers = t.headers ? t.headers : {}, void 0 === t.headers.Cookie && void 0 === t.cookieJar && (t.cookieJar = this.ckjar)) } get(t, e = (() => { })) { t.headers && (delete t.headers["Content-Type"], delete t.headers["Content-Length"]), this.isSurge() || this.isLoon() ? (this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { "X-Surge-Skip-Scripting": !1 })), $httpClient.get(t, (t, s, i) => { !t && s && (s.body = i, s.statusCode = s.status), e(t, s, i) })) : this.isQuanX() ? (this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { hints: !1 })), $task.fetch(t).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => e(t))) : this.isNode() && (this.initGotEnv(t), this.got(t).on("redirect", (t, e) => { try { if (t.headers["set-cookie"]) { const s = t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString(); s && this.ckjar.setCookieSync(s, null), e.cookieJar = this.ckjar } } catch (t) { this.logErr(t) } }).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => { const { message: s, response: i } = t; e(s, i, i && i.body) })) } post(t, e = (() => { })) { if (t.body && t.headers && !t.headers["Content-Type"] && (t.headers["Content-Type"] = "application/x-www-form-urlencoded"), t.headers && delete t.headers["Content-Length"], this.isSurge() || this.isLoon()) this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { "X-Surge-Skip-Scripting": !1 })), $httpClient.post(t, (t, s, i) => { !t && s && (s.body = i, s.statusCode = s.status), e(t, s, i) }); else if (this.isQuanX()) t.method = "POST", this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { hints: !1 })), $task.fetch(t).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => e(t)); else if (this.isNode()) { this.initGotEnv(t); const { url: s, ...i } = t; this.got.post(s, i).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => { const { message: s, response: i } = t; e(s, i, i && i.body) }) } } time(t, e = null) { const s = e ? new Date(e) : new Date; let i = { "M+": s.getMonth() + 1, "d+": s.getDate(), "H+": s.getHours(), "m+": s.getMinutes(), "s+": s.getSeconds(), "q+": Math.floor((s.getMonth() + 3) / 3), S: s.getMilliseconds() }; /(y+)/.test(t) && (t = t.replace(RegExp.$1, (s.getFullYear() + "").substr(4 - RegExp.$1.length))); for (let e in i) new RegExp("(" + e + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? i[e] : ("00" + i[e]).substr(("" + i[e]).length))); return t } msg(e = t, s = "", i = "", r) { const o = t => { if (!t) return t; if ("string" == typeof t) return this.isLoon() ? t : this.isQuanX() ? { "open-url": t } : this.isSurge() ? { url: t } : void 0; if ("object" == typeof t) { if (this.isLoon()) { let e = t.openUrl || t.url || t["open-url"], s = t.mediaUrl || t["media-url"]; return { openUrl: e, mediaUrl: s } } if (this.isQuanX()) { let e = t["open-url"] || t.url || t.openUrl, s = t["media-url"] || t.mediaUrl; return { "open-url": e, "media-url": s } } if (this.isSurge()) { let e = t.url || t.openUrl || t["open-url"]; return { url: e } } } }; if (this.isMute || (this.isSurge() || this.isLoon() ? $notification.post(e, s, i, o(r)) : this.isQuanX() && $notify(e, s, i, o(r))), !this.isMuteLog) { let t = ["", "==============📣系统通知📣=============="]; t.push(e), s && t.push(s), i && t.push(i), console.log(t.join("\n")), this.logs = this.logs.concat(t) } } log(...t) { t.length > 0 && (this.logs = [...this.logs, ...t]), console.log(t.join(this.logSeparator)) } logErr(t, e) { const s = !this.isSurge() && !this.isQuanX() && !this.isLoon(); s ? this.log("", `❗️${this.name}, 错误!`, t.stack) : this.log("", `❗️${this.name}, 错误!`, t) } wait(t) { return new Promise(e => setTimeout(e, t)) } done(t = {}) { const e = (new Date).getTime(), s = (e - this.startTime) / 1e3; this.log("", `🔔${this.name}, 结束! 🕛 ${s} 秒`), this.log(), (this.isSurge() || this.isQuanX() || this.isLoon()) && $done(t) } }(t, e) } @@ -733,44 +736,44 @@ function postToDingTalk(messgae) { // that.log(messgae) const body = { - "msgtype": "markdown", - "markdown": { - "title": "签到领现金", - "text": message1 - }, - "at": { - "atMobiles": [], - "isAtAll": false - } + "msgtype": "markdown", + "markdown": { + "title": "签到领现金", + "text": message1 + }, + "at": { + "atMobiles": [], + "isAtAll": false + } } $.post(toDingtalk(dingtalk, JSON.stringify(body)), (data, status, xhr) => { - try { - that.log(resp) - that.log(data) - if (err) { - that.log(JSON.stringify(err)); - $.logErr(err); - } else { - if (safeGet(data)) { - $.duckRes = JSON.parse(data); - } - } - } catch (e) { - $.logErr(e, resp) - } finally { - resolve(); + try { + that.log(resp) + that.log(data) + if (err) { + that.log(JSON.stringify(err)); + $.logErr(err); + } else { + if (safeGet(data)) { + $.duckRes = JSON.parse(data); + } } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } }, "json") } function toDingtalk(urlmain, bodyMain) { return { - url: urlmain, - body: bodyMain, - headers: { 'Content-Type': 'application/json;charset=utf-8' }, - timeout: 10000, + url: urlmain, + body: bodyMain, + headers: { 'Content-Type': 'application/json;charset=utf-8' }, + timeout: 10000, } } \ No newline at end of file diff --git a/src/main/resources/test_sendBean.js b/src/main/resources/test_sendBean.js new file mode 100644 index 0000000..f8ac772 --- /dev/null +++ b/src/main/resources/test_sendBean.js @@ -0,0 +1,557 @@ +/* +送豆得豆 +活动入口:来客有礼小程序 +已支持IOS双京东账号,Node.js支持N个京东账号 +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +============Quantumultx=============== +[task_local] +#送豆得豆 +45 1,12 * * * https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jd_sendBeans.js, tag=送豆得豆, img-url=https://raw.githubusercontent.com/Orz-3/mini/master/Color/jd.png, enabled=true +================Loon============== +[Script] +cron "45 1,12 * * *" script-path=https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jd_sendBeans.js,tag=送豆得豆 +===============Surge================= +送豆得豆 = type=cron,cronexp="45 1,12 * * *",wake-system=1,timeout=3600,script-path=https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jd_sendBeans.js +============小火箭========= +送豆得豆 = type=cron,script-path=https://raw.githubusercontent.com/Aaron-lv/sync/jd_scripts/jd_sendBeans.js, cronexpr="45 1,12 * * *", timeout=3600, enable=true + */ +const $ = new Env('送豆得豆'); +const notify = $.isNode() ? require('./sendNotify') : ''; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], isLoginInfo = {}; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }); + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; +} else { + cookiesArr = [$.getdata("CookieJD"), $.getdata("CookieJD2"), ...$.toObj($.getdata("CookiesJD") || "[]").map((item) => item.cookie)].filter((item) => !!item); +} +!(async () => { + if (!cookiesArr[0]) { + $.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + return; + } + $.activityId = ''; + $.completeNumbers = ''; + console.log(`开始获取活动信息`); + for (let i = 0; (cookiesArr.length < 3 ? i < cookiesArr.length : i < 3) && $.activityId === ''; i++) { + $.cookie = cookiesArr[i]; + $.UserName = decodeURIComponent($.cookie.match(/pt_pin=([^; ]+)(?=;?)/) && $.cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]); + $.isLogin = true; + $.nickName = '' + if (isLoginInfo[$.UserName] === false) { + + } else { + if (!isLoginInfo[$.UserName]) { + await TotalBean(); + isLoginInfo[$.UserName] = $.isLogin + } + } + if (!isLoginInfo[$.UserName]) continue + await getActivityInfo(); + } + if ($.activityId === '') { + console.log(`获取活动ID失败`); + return; + } + + let openCount = Math.floor((Number(cookiesArr.length)-1)/Number($.completeNumbers)); + console.log(`\n共有${cookiesArr.length}个账号,前${openCount}个账号可以开团\n`); + let openTuanList = []; + console.log(`前${openCount}个账号开始开团\n`); + for (let i = 0; i < cookiesArr.length && i < openCount; i++) { + $.cookie = cookiesArr[i]; + $.UserName = decodeURIComponent($.cookie.match(/pt_pin=([^; ]+)(?=;?)/) && $.cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]); + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + console.log(`\n*****开始【京东账号${$.index}】${$.nickName || $.UserName}*****\n`); + if (isLoginInfo[$.UserName] === false) { + + } else { + if (!isLoginInfo[$.UserName]) { + await TotalBean(); + isLoginInfo[$.UserName] = $.isLogin + } + } + if (!isLoginInfo[$.UserName]) continue + await openTuan(); + } + console.log('\n开团信息\n'+JSON.stringify(openTuanList)); + console.log(`\n开始互助\n`); + let ckList = getRandomArrayElements(cookiesArr,cookiesArr.length); + + for (let i = 0; i < ckList.length && openTuanList.length > 0; i++) { + $.cookie = ckList[i]; + $.UserName = decodeURIComponent($.cookie.match(/pt_pin=([^; ]+)(?=;?)/) && $.cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]); + $.index = i + 1; + $.isLogin = true; + console.log(`\n*****开始【京东账号${$.index}】${$.nickName || $.UserName}*****\n`); + if (isLoginInfo[$.UserName] === false) { + + } else { + if (!isLoginInfo[$.UserName]) { + await TotalBean(); + isLoginInfo[$.UserName] = $.isLogin + } + } + if (!isLoginInfo[$.UserName]) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue; + } + await helpMain(); + } + console.log(`\n开始领取奖励\n`); + for (let i = 0; i < cookiesArr.length && i < openCount; i++) { + $.cookie = cookiesArr[i]; + $.UserName = decodeURIComponent($.cookie.match(/pt_pin=([^; ]+)(?=;?)/) && $.cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]); + $.index = i + 1; + $.isLogin = true; + console.log(`\n*****开始【京东账号${$.index}】${$.nickName || $.UserName}*****\n`); + if (isLoginInfo[$.UserName] === false) { + + } else { + if (!isLoginInfo[$.UserName]) { + await TotalBean(); + isLoginInfo[$.UserName] = $.isLogin + } + } + if (!isLoginInfo[$.UserName]) continue + await rewardMain(); + } + for (let i = 0; i < cookiesArr.length; i++) { + $.cookie = cookiesArr[i]; + $.UserName = decodeURIComponent($.cookie.match(/pt_pin=([^; ]+)(?=;?)/) && $.cookie.match(/pt_pin=([^; ]+)(?=;?)/)[1]); + $.index = i + 1; + $.isLogin = true; + $.nickName = '' + console.log(`\n*****开始【京东账号${$.index}】${$.nickName || $.UserName}*****\n`); + if (isLoginInfo[$.UserName] === false) { + + } else { + if (!isLoginInfo[$.UserName]) { + await TotalBean(); + isLoginInfo[$.UserName] = $.isLogin + } + } + if (!isLoginInfo[$.UserName]) continue + await myReward() + } +})().catch((e) => {$.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '')}).finally(() => {$.done();}); + +async function getActivityInfo(){ + $.activityList = []; + await getActivityList(); + if($.activityList.length === 0){ + return; + } + for (let i = 0; i < $.activityList.length; i++) { + if($.activityList[i].status !== 'NOT_BEGIN'){ + $.activityId = $.activityList[i].activeId; + $.activityCode = $.activityList[i].activityCode; + break; + } + } + await $.wait(3000); + $.detail = {}; + await getActivityDetail(); + if(JSON.stringify($.detail) === '{}'){ + console.log(`获取活动详情失败`); + return; + }else{ + console.log(`获取活动详情成功`); + } + $.completeNumbers = $.detail.activityInfo.completeNumbers; + console.log(`获取到的活动ID:${$.activityId},需要邀请${$.completeNumbers}人瓜分`); +} + +async function myReward(){ + return new Promise(async (resolve) => { + let lkt = new Date().getTime() + let lks = $.md5('' + 'JL1VTNRadM68cIMQ' + lkt).toString() + let options = { + "url": `https://sendbeans.jd.com/common/api/bean/activity/myReward?itemsPerPage=10¤tPage=1&sendType=0&invokeKey=JL1VTNRadM68cIMQ`, + "headers": { + "Host": "sendbeans.jd.com", + "Origin": "https://sendbeans.jd.com", + "Cookie": $.cookie, + "app-id": "h5", + "Connection": "keep-alive", + "Accept": "application/json, text/plain, */*", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + "Accept-Language": "zh-cn", + "Referer": "https://sendbeans.jd.com/dist/index.html", + "Accept-Encoding": "gzip, deflate, br", + "openId": "", + 'lkt': lkt, + 'lks': lks + } + }; + $.get(options, async (err, resp, data) => { + try { + data = JSON.parse(data); + if (data.success) { + let canReward = false + for (let key of Object.keys(data.datas)) { + let vo = data.datas[key] + if (vo.status === 3 && vo.type === 2) { + canReward = true + $.rewardRecordId = vo.id + await rewardBean() + $.rewardRecordId = '' + } + } + if (!canReward) console.log(`没有可领取奖励`) + }else{ + console.log(JSON.stringify(data)); + } + } catch (e) { + console.log(e); + } finally { + resolve(data); + } + }) + }) +} + +async function getActivityList(){ + return new Promise((resolve) => { + let lkt = new Date().getTime() + let lks = $.md5('' + 'JL1VTNRadM68cIMQ' + lkt).toString() + let options = { + "url": `https://sendbeans.jd.com/common/api/bean/activity/get/entry/list/by/channel?channelId=14&channelType=H5&sendType=0&singleActivity=false&invokeKey=JL1VTNRadM68cIMQ`, + "headers": { + "Host": "sendbeans.jd.com", + "Origin": "https://sendbeans.jd.com", + "Cookie": $.cookie, + "Connection": "keep-alive", + "Accept": "application/json, text/plain, */*", + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + "Accept-Language": "zh-cn", + "Referer": "https://sendbeans.jd.com/dist/index.html", + "Accept-Encoding": "gzip, deflate, br", + "openId": "", + 'lkt': lkt, + 'lks': lks + } + }; + $.get(options, (err, resp, data) => { + try { + data = JSON.parse(data); + if (data.success) { + $.activityList = data.data.items; + }else{ + console.log(JSON.stringify(data)); + } + } catch (e) { + console.log(e); + } finally { + resolve(data); + } + }) + }) +} + +async function openTuan(){ + $.detail = {}; + $.rewardRecordId = ''; + await getActivityDetail(); + if(JSON.stringify($.detail) === '{}'){ + console.log(`获取活动详情失败`); + return; + }else{ + $.rewardRecordId = $.detail.rewardRecordId; + console.log(`获取活动详情成功`); + } + await $.wait(3000); + if(!$.rewardRecordId){ + if(!$.detail.invited){ + await invite(); + await $.wait(1000); + await getActivityDetail(); + await $.wait(3000); + $.rewardRecordId = $.detail.rewardRecordId; + console.log(`【京东账号${$.index}】${$.UserName} 瓜分ID:${$.rewardRecordId}`); + } + }else{ + console.log(`【京东账号${$.index}】${$.UserName} 瓜分ID:${$.rewardRecordId}`); + } + $.openTuanList.push({ + 'user':$.UserName, + 'rewardRecordId':$.rewardRecordId, + 'completed':$.detail.completed, + 'rewardOk':$.detail.rewardOk + }); +} + +async function helpMain(){ + $.canHelp = true; + for (let j = 0; j < openTuanList.length && $.canHelp; j++) { + $.oneTuanInfo = openTuanList[j]; + if( $.UserName === $.oneTuanInfo['user']){ + continue; + } + if( $.oneTuanInfo['completed']){ + continue; + } + console.log(`${$.UserName}去助力${$.oneTuanInfo['user']}`); + $.detail = {}; + $.rewardRecordId = ''; + await getActivityDetail(); + if(JSON.stringify($.detail) === '{}'){ + console.log(`获取活动详情失败`); + return; + }else{ + $.rewardRecordId = $.detail.rewardRecordId; + console.log(`获取活动详情成功`); + } + await $.wait(3000); + await help(); + await $.wait(2000); + } +} + +async function rewardMain(){ + $.detail = {}; + $.rewardRecordId = ''; + await getActivityDetail(); + if(JSON.stringify($.detail) === '{}'){ + console.log(`获取活动详情失败`); + return; + }else{ + $.rewardRecordId = $.detail.rewardRecordId; + console.log(`获取活动详情成功`); + } + await $.wait(3000); + if($.rewardRecordId && $.detail.completed && !$.detail.rewardOk){ + await rewardBean(); + await $.wait(2000); + }else if($.rewardRecordId && $.detail.completed && $.detail.rewardOk){ + console.log(`奖励已领取`); + }else{ + console.log(`未满足条件,不可领取奖励`); + } +} +async function rewardBean(){ + return new Promise((resolve) => { + let lkt = new Date().getTime() + let lks = $.md5('' + 'JL1VTNRadM68cIMQ' + lkt).toString() + let options = { + "url": `https://draw.jdfcloud.com/common/api/bean/activity/sendBean?rewardRecordId=${$.rewardRecordId}&jdChannelId=&userSource=mp&appId=wxccb5c536b0ecd1bf&invokeKey=JL1VTNRadM68cIMQ`, + "headers": { + 'content-type' : `application/json`, + 'Connection' : `keep-alive`, + 'Accept-Encoding' : `gzip,compress,br,deflate`, + 'App-Id' : `wxccb5c536b0ecd1bf`, + 'Lottery-Access-Signature' : `wxccb5c536b0ecd1bf1537237540544h79HlfU`, + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 14_7_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 MicroMessenger/8.0.13(0x18000d2a) NetType/WIFI Language/zh_CN", + 'openId' : ``, + 'Host' : `draw.jdfcloud.com`, + 'Referer' : `https://servicewechat.com/wxccb5c536b0ecd1bf/755/page-frame.html`, + 'cookie' : $.cookie, + 'lkt': lkt, + 'lks': lks + } + }; + $.get(options, (err, resp, data) => { + try { + data = JSON.parse(data); + if(data.success){ + console.log(`领取豆子奖励成功`); + }else{ + console.log(JSON.stringify(data)); + } + } catch (e) { + console.log(e); + } finally { + resolve(data); + } + }) + }); +} + +function getRandomArrayElements(arr, count) { + var shuffled = arr.slice(0), i = arr.length, min = i - count, temp, index; + while (i-- > min) { + index = Math.floor((i + 1) * Math.random()); + temp = shuffled[index]; + shuffled[index] = shuffled[i]; + shuffled[i] = temp; + } + return shuffled.slice(min); +} + +async function help() { + await new Promise((resolve) => { + let lkt = new Date().getTime() + let lks = $.md5('' + 'JL1VTNRadM68cIMQ' + lkt + $.activityCode).toString() + let options = { + "url": `https://draw.jdfcloud.com/common/api/bean/activity/participate?activityCode=${$.activityCode}&activityId=${$.activityId}&inviteUserPin=${encodeURIComponent($.oneTuanInfo['user'])}&invokeKey=JL1VTNRadM68cIMQ×tap=${Date.now()}`, + "headers": { + 'content-type' : `application/json`, + 'Connection' : `keep-alive`, + 'Accept-Encoding' : `gzip,compress,br,deflate`, + 'App-Id' : `wxccb5c536b0ecd1bf`, + 'Lottery-Access-Signature' : `wxccb5c536b0ecd1bf1537237540544h79HlfU`, + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 14_7_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 MicroMessenger/8.0.13(0x18000d2a) NetType/WIFI Language/zh_CN", + 'openId' : ``, + 'Host' : `draw.jdfcloud.com`, + 'Referer' : `https://servicewechat.com/wxccb5c536b0ecd1bf/755/page-frame.html`, + 'cookie' : $.cookie, + 'lkt': lkt, + 'lks': lks + } + }; + $.post(options, (err, resp, res) => { + try { + if (res) { + res = JSON.parse(res); + if(res.data.result === 5){ + $.oneTuanInfo['completed'] = true; + }else if(res.data.result === 0 || res.data.result === 1){ + $.canHelp = false; + } + console.log(JSON.stringify(res)); + } + } catch (e) { + console.log(e); + } finally { + resolve(res); + } + }) + }); +} + +async function invite() { + let lkt = new Date().getTime() + let lks = $.md5('' + 'JL1VTNRadM68cIMQ' + lkt + $.activityCode).toString() + const url = `https://draw.jdfcloud.com/common/api/bean/activity/invite?activityCode=${$.activityCode}&openId=&activityId=${$.activityId}&userSource=mp&formId=123&jdChannelId=&fp=&appId=wxccb5c536b0ecd1bf&invokeKey=JL1VTNRadM68cIMQ`; + const method = `POST`; + const headers = { + 'content-type' : `application/json`, + 'Connection' : `keep-alive`, + 'Accept-Encoding' : `gzip,compress,br,deflate`, + 'App-Id' : `wxccb5c536b0ecd1bf`, + 'Lottery-Access-Signature' : `wxccb5c536b0ecd1bf1537237540544h79HlfU`, + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 14_7_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 MicroMessenger/8.0.13(0x18000d2a) NetType/WIFI Language/zh_CN", + 'openId' : ``, + 'Host' : `draw.jdfcloud.com`, + 'Referer' : `https://servicewechat.com/wxccb5c536b0ecd1bf/755/page-frame.html`, + 'cookie' : $.cookie, + 'lkt': lkt, + 'lks': lks + }; + const body = `{}`; + const myRequest = { + url: url, + method: method, + headers: headers, + body: body + }; + return new Promise(async resolve => { + $.post(myRequest, (err, resp, data) => { + try { + data = JSON.parse(data); + if(data.success){ + console.log(`发起瓜分成功`); + }else{ + console.log(JSON.stringify(data)); + } + } catch (e) { + console.log(data); + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + +async function getActivityDetail() { + let lkt = new Date().getTime() + let lks = $.md5('' + 'JL1VTNRadM68cIMQ' + lkt + $.activityCode).toString() + const url = `https://draw.jdfcloud.com/common/api/bean/activity/detail?activityCode=${$.activityCode}&activityId=${$.activityId}&userOpenId=×tap=${Date.now()}&userSource=mp&jdChannelId=&appId=wxccb5c536b0ecd1bf&invokeKey=JL1VTNRadM68cIMQ`; + const method = `GET`; + const headers = { + 'cookie' : $.cookie, + 'openId' : ``, + 'Connection' : `keep-alive`, + 'App-Id' : `wxccb5c536b0ecd1bf`, + 'content-type' : `application/json`, + 'Host' : `draw.jdfcloud.com`, + 'Accept-Encoding' : `gzip,compress,br,deflate`, + "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 14_7_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 MicroMessenger/8.0.13(0x18000d2a) NetType/WIFI Language/zh_CN", + 'Lottery-Access-Signature' : `wxccb5c536b0ecd1bf1537237540544h79HlfU`, + 'Referer' : `https://servicewechat.com/wxccb5c536b0ecd1bf/755/page-frame.html`, + 'lkt': lkt, + 'lks': lks + }; + const myRequest = {url: url, method: method, headers: headers}; + return new Promise(async resolve => { + $.get(myRequest, (err, resp, data) => { + try { + //console.log(data); + data = JSON.parse(data); + if(data.success){ + $.detail = data.data; + } + } catch (e) { + //console.log(data); + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function TotalBean() { + return new Promise(async resolve => { + const options = { + url: "https://wq.jd.com/user_new/info/GetJDUserInfoUnion?sceneval=2", + headers: { + Host: "wq.jd.com", + Accept: "*/*", + Connection: "keep-alive", + Cookie: $.cookie, + "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"), + "Accept-Language": "zh-cn", + "Referer": "https://home.m.jd.com/myJd/newhome.action?sceneval=2&ufc=&", + "Accept-Encoding": "gzip, deflate, br" + } + } + $.get(options, (err, resp, data) => { + try { + if (err) { + $.logErr(err) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 1001) { + $.isLogin = false; //cookie过期 + return; + } + if (data['retcode'] === 0 && data.data && data.data.hasOwnProperty("userInfo")) { + $.nickName = data.data.userInfo.baseInfo.nickname; + } + } else { + console.log('京东服务器返回空数据'); + } + } + } catch (e) { + $.logErr(e) + } finally { + resolve(); + } + }) + }) +} +// md5 +!function(n){function t(n,t){var r=(65535&n)+(65535&t);return(n>>16)+(t>>16)+(r>>16)<<16|65535&r}function r(n,t){return n<>>32-t}function e(n,e,o,u,c,f){return t(r(t(t(e,n),t(u,f)),c),o)}function o(n,t,r,o,u,c,f){return e(t&r|~t&o,n,t,u,c,f)}function u(n,t,r,o,u,c,f){return e(t&o|r&~o,n,t,u,c,f)}function c(n,t,r,o,u,c,f){return e(t^r^o,n,t,u,c,f)}function f(n,t,r,o,u,c,f){return e(r^(t|~o),n,t,u,c,f)}function i(n,r){n[r>>5]|=128<>>9<<4)]=r;var e,i,a,d,h,l=1732584193,g=-271733879,v=-1732584194,m=271733878;for(e=0;e>5]>>>t%32&255)}return r}function d(n){var t,r=[];for(r[(n.length>>2)-1]=void 0,t=0;t>5]|=(255&n.charCodeAt(t/8))<16&&(o=i(o,8*n.length)),r=0;r<16;r+=1){u[r]=909522486^o[r],c[r]=1549556828^o[r]}return e=i(u.concat(d(t)),512+8*t.length),a(i(c.concat(e),640))}function g(n){var t,r,e="";for(r=0;r>>4&15)+"0123456789abcdef".charAt(15&t)}return e}function v(n){return unescape(encodeURIComponent(n))}function m(n){return h(v(n))}function p(n){return g(m(n))}function s(n,t){return l(v(n),v(t))}function C(n,t){return g(s(n,t))}function A(n,t,r){return t?r?s(t,n):C(t,n):r?m(n):p(n)}$.md5=A}(this); +// prettier-ignore +function Env(t,e){"undefined"!=typeof process&&JSON.stringify(process.env).indexOf("GITHUB")>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`🔔${this.name}, 开始!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let e in i)new RegExp("("+e+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:("00"+i[e]).substr((""+i[e]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`❗️${this.name}, 错误!`,t.stack):this.log("",`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/src/main/resources/test_trytryOne.js b/src/main/resources/test_trytryOne.js index 0b73313..1386887 100644 --- a/src/main/resources/test_trytryOne.js +++ b/src/main/resources/test_trytryOne.js @@ -80,7 +80,7 @@ let args_xh = { * 试用商品标题过滤 * 可设置环境变量:JD_TRY_TITLEFILTERS,关键词与关键词之间用@分隔 * */ - titleFilters: ["书法", "决明子", "钢化膜", "保护贴膜", "手机壳", "自拍杆", "养生茶", "玉米须", "栀子茶", "黑芝麻丸", "赛柏瑞斯", "玫瑰花茶", "品雅有机茶", "雷气日式", "先徽葱油", "德生源氨基酸洗发水", "决明子茶", "悠悠球", "人参五宝茶", "遥控器", "蒲公英茶", "烘焙纸杯", "称斤积木", "拨浪鼓", "打包袋子", "按摩球", "帆睿", "登山包", "抵用券", "急救箱", "染头发膏", "变唇膏", "弹力带", "儿童零食", "儿童剪头发工具", "平剪牙剪刀打薄剪刀", "刘海内扣直发器", "益生菌小E条漱口水", "二锅头", "魔法士干脆面方便面24袋整箱装", "樱の色鱼子酱", "轻酸瓶3%", "青汁", "隔离霜", "去枣核", "川品社", "矶钓钓鱼配件", "棉线结矶杆", "半圆滑漂挡", "远投路滑配件", "滑漂座", "软电线", "激光剑", "灭鼠", "思维棋", "双层片", "猫用", "鼻腔喷雾", "电脑包", "鸥曼GTL", "卧铺毛毯", "双导向", "翻页笔", "蛋白肽", "T口弯头", "货车用品", "床垫套", "电焊护脚", "G100", "擦车清洁工具", "掸子", "射灯", "欧布圣剑", "超比乐", "滚梳直柄", "凝胶糖果", "DHA藻油", "水带", "摘果神器", "宝宝儿童零食", "总复习", "满分冲刺", "黄冈", "小状元", "钓鱼插件", "寒假作业", "作业", "菜罩", "手机线", "美容油", "贺卡", "眼贴", "小斗篷", "小孩子演奏", "砍柴刀", "消防应急灯", "食用色素", "烘焙彩针糖果", "德尔地板", "水管保温套", "水管道", "定位器", "追踪器", "电瓶", "快递纸箱", "尤克里里", "金龙鱼 面条挂面", "痛风", "KVM切换器", "水泥", "猫罐头", "去斑霜", "0-12岁", "4/3膜", "FMJ", "H10E", "HDMI", "HEISHA", "HPV", "KB216有线键盘", "LED", "MS116 有线鼠标", "N1162有线鼠标", "Ockered", "PVC板", "SD", "SD卡", "SMOVES", "SUP掌机", "U盘", "VGA", "hdmi", "hpv", "led开关电源", "uv镜", "win10", "windows", "一次性", "一片装", "一盒", "万向滑轮", "万用表", "万藓灵", "三角阀", "三轮车", "不干胶标签带", "专升本", "专用贴", "丝袜", "中国电信", "中国结", "中央扶手箱", "中性水笔", "中性笔", "中老年", "丰胸", "串珠玩具", "丸", "乒乓球", "九九乘法", "九九乘除", "书包", "乳液", "乳腺", "交换", "交换机", "产品体验", "享底价", "亲子互动", "亿优信", "仓鼠零食", "仿真小蛋糕", "伊威", "优盘", "会员", "会员卡", "会议杯子", "会议记录", "传菜铃", "体温计", "体验装", "侧挂式", "便秘", "保健", "保护壳", "保护套", "保护膜", "保护镜", "保暖女裤", "保暖裤", "保温棉", "保鲜膜", "信封", "信纸", "修护", "修正带", "修眉", "修眉剪", "倒车", "倒车镜", "假发", "假睫毛", "停车牌", "健康检测", "储奶袋", "儿童n95", "儿童串珠玩具", "儿童乐园", "儿童便捷", "儿童保温水杯", "儿童医生", "儿童口罩", "儿童吸管", "儿童奶粉", "儿童成长", "儿童拌饭", "儿童暖暖套", "儿童椅子", "儿童沐浴露", "儿童牙膏", "儿童玩具枪", "儿童电动牙刷", "儿童电话手表", "儿童益生菌", "儿童磨牙饼", "儿童背包", "儿童随身", "儿童雨伞", "充电头", "充电桩", "光和青春", "光驱", "免钉胶水", "八倍镜", "公主项链", "公文包", "养芝堂", "内胆包", "内衣", "内裤", "冰箱贴", "冰袋", "冷兵器", "冷凝胶", "冷敷贴", "冻干粉", "净水剂", "减关镜", "减肥", "凳子套", "刀头", "刀片", "分流", "分流器", "分线盒", "切割片", "切菜板", "创可贴", "刨木", "别针", "刮痧", "刮痧板", "刷头", "刷子", "刷牙头", "刹车油", "刺激贴", "剂", "剃须刀配件", "削皮刀", "前列腺", "剥虾", "剪", "剪钳", "割草机", "办公会议茶杯", "办公宝", "办公杯", "加密狗", "加温器", "勿拍", "包皮", "包装膜", "化妆", "匙扣", "医生", "半身不遂", "半身裙", "单拍不发货", "卡册", "卡套", "卡尺", "卡托", "卡牌", "卡针", "卧铺垫", "卸妆", "卸妆水", "压差表", "压片", "去毛器", "去角质", "参肽片", "双面板", "反光条贴", "反光板", "反光贴", "反光镜", "反弹器", "变身器", "口琴", "口红", "口罩", "口罩盒", "口腔", "口腔抑菌", "口香糖", "台灯", "台账本", "号码卡", "吃饭衣", "合成机油", "同仁堂", "后膜", "启动电源", "吸奶器", "吸顶灯", "告知牌", "周岁", "呼噜", "咖啡豆", "咬钩", "咽炎", "哑光", "哨", "哺乳", "哺乳套装", "唇釉", "唑溶液", "商务休闲", "啪啪", "喷壶", "喷雾器", "嚼片", "园艺工具", "围兜", "围裙", "固定器", "图钉", "圆珠笔", "土工布", "圣杯", "在线直播", "地吸", "地桩", "地漏", "地面清洁液", "坐便器", "坐便椅", "坐垫", "坐骨膏", "垃圾处理器", "垃圾袋", "垫片", "培训", "塑料士兵小军人玩具", "塑料杯", "塑身裤", "塔菲克", "墙纸", "增生贴", "增高", "墨块", "墨条", "墨水", "墨盒", "墨粉", "墨镜", "壁纸", "声卡套装", "复合肥", "外用", "多功能尺子", "多色笔", "大头围", "天线", "头皮", "夹", "女士内裤", "女士内裤,少女内裤", "女童裤子", "女童靴子", "奶瓶", "奶粉", "如意碗", "妆", "妇女", "婴儿", "婴幼儿", "孔明锁", "孕妇装", "存储卡", "学习卡", "学历", "学生文具", "孩儿乐", "安全帽", "安全裤", "安全锤", "定位器", "定做", "定做榻榻米", "定制", "宝塔糖", "宝宝口罩", "宝宝奶粉", "宝宝成长", "宝宝灯笼裤", "宝宝牙刷", "宝宝玩具车", "宝宝霜", "宝宝鞋子", "宝珠笔", "实验课", "宠物", "宣纸", "宫颈炎", "密封条", "密封袋", "密码锁", "富贵包", "对接头", "导购", "封口机", "小兔女士", "小勺子", "小塔糖", "小学", "少儿读物", "尤尖锐湿疣", "尺", "尼龙管", "尼龙网", "尿", "尿素", "尿素霜", "屏幕膜", "屏蔽袋", "屏风", "工作手册", "工作服", "巾", "布袋", "帽子", "幕布", "干洗剂", "干眼症", "干裂", "平光镜", "平衡线", "幼儿", "幼儿园", "幼儿配方", "床头台灯", "底座", "座垫", "座套", "康复", "延时", "延迟", "延迟喷雾", "延长器", "开果器", "弹力绳", "弹簧", "彩带", "彩铅", "徽墨", "情趣", "惯性小汽车", "成人票", "成长裤", "戒奶嘴", "戒烟", "手册", "手动幕", "手套", "手工DIY", "手工黏土", "手推车", "手提秤", "手术刀", "手机卡", "手机壳", "手机维修", "手电筒", "打包绳", "打印机碳带", "打底", "打草绳", "打虫糖", "打钉枪", "打飞机", "托盘", "扩音器", "扭扭车", "把手", "抑菌膏", "抓周", "抓痒器", "投屏器", "投影仪包", "折叠锯子", "抚奶嘴", "抛光机", "护具", "护手霜", "护栏", "护理", "护眼贴", "护肤", "护腕", "护腿套", "护膝", "护踝", "报警器", "抬头纹", "抵用券", "抽屉轨道", "抽水器", "拉力器", "拉力绳", "拉柳枪", "拐杖", "拔毒膏", "拾音器", "挂篓", "挂绳", "挂钟", "挂钩", "指套", "挑逗", "挡风板", "挡风玻璃", "挤奶器", "捆扎绳", "捆绑绳", "损伤膏贴", "掏耳", "掏耳朵", "排气扇", "接线式直管", "提示牌", "提词器", "插座", "插销", "握力器", "摄像头", "摄像头膜", "摄像头镜片", "摄影灯", "摆件车模", "摇步器", "撑衣杆", "擦玻璃", "擦窗", "擦银布", "收敛水", "收藏册", "收钱码", "收银机", "改光膜", "效果图", "敏感", "敏肌", "救生衣", "教具", "教学", "教学视频", "教材", "教育", "数据线", "整理棒", "文胸", "斗笔", "断奶", "方向盘", "方向盘套", "日历", "早教", "替换头", "月子", "有机肥", "木糖醇", "机油", "机顶盒", "材料包", "条码", "枇杷秋梨膏", "枇杷膏", "枇杷雪梨膏", "枕头套", "架", "染发", "染发剂", "柔肤水", "柜吸", "栅网", "标志牌", "标签纸", "标识牌", "树苗", "样板盒", "格子长袖", "框", "桌垫", "梯", "梯子", "梳子", "棉袜", "棒棒糖", "棒球", "椅子套", "椅背置物袋", "模具", "止痒", "死皮", "母乳", "毛囊", "毛孔", "气压杆", "气垫霜", "气雾棒", "水乳", "水凝膜", "水勺", "水平仪", "水晶头", "水晶泥", "水枪", "水龙头", "汤勺", "汤盅", "汽油锯", "汽车头枕腰靠套装", "汽车尾部挂件", "汽车摆件", "汽车椅背", "汽车脚垫", "沉香", "沐浴包", "油壶", "油漆", "油罐", "泡沫", "泡沫胶", "泡泡纸", "泡澡球", "泥灸", "注射器", "注射针", "泳衣", "洁面", "洋娃娃", "洗地专用", "洗地液", "洗面", "洗鼻器", "流量卡", "测电笔", "测评", "测试", "浮标", "浮漂", "涂鸦贴纸", "消化不良", "消化道出血", "消毒", "消毒液", "消防水带", "润唇膏", "润滑", "润滑液", "润颜乳", "清水剂", "清洁刷", "清洁套装", "清洁液", "清洁球", "清洁软胶", "清洁配件", "渔具", "温度计", "湿手器", "湿粮", "滋养霜", "滑块袋", "滑板车", "滤杯", "滤网", "滤芯", "滤镜", "漆", "漱口水", "潜水服", "火花塞", "灭蝇", "灯泡", "灶台贴纸", "炎膏贴", "炖盅", "烧水棒", "热敷包", "热熔胶枪", "煤油", "燃气报警器", "爬爬垫", "爸爸装", "爸爸鞋", "爽肤水", "牙刷", "牙刷头", "牙刷收纳盒", "牙刷替换头", "牙套", "牙签", "牙签盒", "牙签防水", "牙线", "牙膏", "牛仔裤", "牛舌", "牵引器", "犬粮", "狗狗沐浴露", "狗皮膏", "狗粮", "狗链", "狗零食", "猪油", "猫咪", "猫咪玩具", "猫玩具", "猫砂", "猫粮", "玉米粉", "玛咖片", "玩具女孩", "玻尿酸", "玻珠", "玻珠幕", "玻璃", "玻璃吊", "玻璃胶", "玻璃镜片", "玻璃防雾剂", "球帽", "球拍", "理发器", "理发推", "理疗贴", "琴弦", "瑶浴粉", "瓜刨", "用友", "甲醛", "电子秤", "电容笔", "电池", "电源线", "电磨组套", "电缆剪", "电脑电源", "电视遥控器", "电话卡", "电话牌", "电钻", "电风扇罩", "男士用品", "男童", "番茄丁", "疣", "疮", "痉挛", "痔疮", "瘙痒", "白板笔", "白酒", "百日宴", "百褶", "皮套", "皮带", "皮筋枪", "益生菌", "监狱", "盘香", "眉笔", "真空袋", "眼影", "眼线笔", "眼罩", "眼药水", "眼袋", "眼镜", "眼霜", "睡眠片", "睡裤", "睫毛", "矫正", "矫正器", "矫正带", "短裙", "砂盆", "砂纸", "砂锅", "砍菜刀", "硅胶", "硬笔", "碎发", "碟子", "碳粉", "磨砂壳", "磨脚", "磨脚石", "示宽灯", "祛斑霜", "祛疤", "神经痛贴", "神露", "福来油", "私处", "秋梨膏", "移动wifi", "空气滤芯", "空调滤", "空调罩", "空调遥控器", "窗帘", "竖笛", "童装", "童装男女童", "笔槽", "笼子", "筋骨贴", "筒灯", "筷子", "签字笔", "米小芽", "类纸膜", "粉刺", "粉底", "粉扑", "粉扑盒子", "粉饼", "精华", "精华乳", "精华露", "精油", "糖糖粉", "素颜霜", "红包封", "红包袋", "红绳", "红花手套", "纱窗", "纱网", "纳米砖", "纸尿裤", "纹眉", "纹眉色料", "线上", "线上课程", "练字", "细纹霜", "绑带", "绘图板", "维修", "维生素", "绷带", "绿幕", "绿草皮", "网卡", "网线", "美容棒", "美容院", "美工刀", "美工笔", "美甲", "美缝", "美肌霜", "美胸", "羽毛球", "翻分器", "翻板钩", "翻身", "老人用品", "老式鸣笛", "老爷车", "老花", "考", "耐火泥", "耳罩", "耳钉", "职业装", "肥佬", "肥料", "育苗盘", "背心马甲", "背膜", "胖子", "胶囊", "胶带", "胸包", "胸针", "脖套", "脚垫", "脱发", "脱毛", "腋毛", "腋毛神器", "腮红", "腰带", "腰椎突出", "腰肌劳损", "膝盖贴", "臂力器", "自弹器", "自慰", "自拍杆", "舒缓水", "色料", "艾叶", "艾条", "艾灸贴", "艾绒贴", "艾胜者", "艾脐贴", "艾草", "芦荟", "花洒", "花瓶", "花萃", "苍蝇拍", "苍蝇药", "茗杯", "茶具", "茶勺", "茶壶", "茶宠", "茶杯", "莆田官网", "菊粉", "菲妮小熊", "葛根", "虾青素", "蚊帐", "蚊香", "蚯蚓粪", "蟑螂药", "行车记录仪", "补光灯", "补发", "补墙", "补水", "表带", "衬衫", "袖套", "袜子", "裁纸刀", "装修", "裤", "裤头", "裸妆", "褪黑素", "西汀片", "覆盖膜", "视线盲区贴纸", "视频mv", "视频教程", "角磨机", "角阀", "解码线", "触控笔", "警示牌", "订书机", "训练器", "评估检测", "试听课", "试用装", "请勿下单", "课", "调音器", "购物券", "购物袋", "贴布", "贴纸", "贴膜", "赠品", "起雾棒", "足浴粉", "趴趴枕", "跳绳", "身体乳", "车内清洁", "车漆", "车篓子", "车轮", "车载u盘", "车锁", "轨道", "转换", "转换器", "转接", "轮胎", "轮胎专用胶水", "软糖", "软膏", "辅食", "输精管", "过家家", "过滤棉", "运势书", "运费专拍", "连衣裙", "适配", "适配器", "逍遥马", "透气贴", "通体砖", "遮挡布", "遮瑕", "遮瑕膏", "避光垫", "避孕套", "酒", "酵素", "金刚胶", "金属探测", "金属探测器", "针头", "钉子", "钓鱼手竿", "钙咀嚼片", "钙片", "钢丝", "钢丝球", "钢化膜", "钢化蛋", "钢笔", "钥匙扣", "钳", "铁丝", "铅笔", "铆管", "锁头", "锁精环", "锅铲", "键盘垫", "锯条", "锯片", "镜头膜", "镜头贴", "镜片", "镰刀", "长筒", "长筒袜", "门吸", "门帘", "门把手", "门档", "门槛条", "门锁", "闹钟", "防卫尖刺", "防撞条", "防晒乳", "防晒霜", "防水敷贴", "防水涂料", "防滑垫", "防疫", "防疫包", "防疫香包", "防蚊裤", "防裂膏", "防静电", "阴囊", "阴部", "陀螺", "陈皮鸡", "降葵花盘", "除菌洗地液", "陶瓷瓶", "隔热板", "隔热棉", "隔离网", "隔音耳塞", "雕刻工具", "雨刮", "雨披", "雨衣", "露指", "青春痘", "静电", "静脉曲张", "静音阻尼", "非卖品", "靠背收纳袋", "面碗", "面罩", "面膜", "面酱", "面霜", "鞋", "鞋垫", "鞋带", "音频线", "领带", "领结", "额头贴", "风水鱼", "风湿贴", "飞机杯", "食盐", "饭盒", "饲料", "香囊袋", "香薰", "香薰精油", "马丁靴", "马桶刷", "马桶垫", "驱虫", "高升专", "高清配件", "魔法棒", "鱼竿", "鱼线", "鱼缸", "鱼钩", "鱼饵", "鸡毛掸子", "鸭肠", "鸳鸯锅", "鹿鞭", "麦克风", "黄膏贴", "黄金卡", "黑头", "黑沙", "黑色水笔", "鼠标垫", "鼠标手", "鼻头", "鼻影", "鼻毛", "鼻毛器", "鼻炎", "龟头"], + titleFilters: ["胖大海","菊花茶","手机充电线","刺梨糕","苦荞茶","拌饭海苔","丁香茶","吸油纸","晚安茶","金属合金","手电","宿便","纤维素","玛咖茶","书法", "决明子", "钢化膜", "保护贴膜", "手机壳", "自拍杆", "养生茶", "玉米须", "栀子茶", "黑芝麻丸", "赛柏瑞斯", "玫瑰花茶", "品雅有机茶", "雷气日式", "先徽葱油", "德生源氨基酸洗发水", "决明子茶", "悠悠球", "人参五宝茶", "遥控器", "蒲公英茶", "烘焙纸杯", "称斤积木", "拨浪鼓", "打包袋子", "按摩球", "帆睿", "登山包", "抵用券", "急救箱", "染头发膏", "变唇膏", "弹力带", "儿童零食", "儿童剪头发工具", "平剪牙剪刀打薄剪刀", "刘海内扣直发器", "益生菌小E条漱口水", "二锅头", "魔法士干脆面方便面24袋整箱装", "樱の色鱼子酱", "轻酸瓶3%", "青汁", "隔离霜", "去枣核", "川品社", "矶钓钓鱼配件", "棉线结矶杆", "半圆滑漂挡", "远投路滑配件", "滑漂座", "软电线", "激光剑", "灭鼠", "思维棋", "双层片", "猫用", "鼻腔喷雾", "电脑包", "鸥曼GTL", "卧铺毛毯", "双导向", "翻页笔", "蛋白肽", "T口弯头", "货车用品", "床垫套", "电焊护脚", "G100", "擦车清洁工具", "掸子", "射灯", "欧布圣剑", "超比乐", "滚梳直柄", "凝胶糖果", "DHA藻油", "水带", "摘果神器", "宝宝儿童零食", "总复习", "满分冲刺", "黄冈", "小状元", "钓鱼插件", "寒假作业", "作业", "菜罩", "手机线", "美容油", "贺卡", "眼贴", "小斗篷", "小孩子演奏", "砍柴刀", "消防应急灯", "食用色素", "烘焙彩针糖果", "德尔地板", "水管保温套", "水管道", "定位器", "追踪器", "电瓶", "快递纸箱", "尤克里里", "金龙鱼 面条挂面", "痛风", "KVM切换器", "水泥", "猫罐头", "去斑霜", "0-12岁", "4/3膜", "FMJ", "H10E", "HDMI", "HEISHA", "HPV", "KB216有线键盘", "LED", "MS116 有线鼠标", "N1162有线鼠标", "Ockered", "PVC板", "SD", "SD卡", "SMOVES", "SUP掌机", "U盘", "VGA", "hdmi", "hpv", "led开关电源", "uv镜", "win10", "windows", "一次性", "一片装", "一盒", "万向滑轮", "万用表", "万藓灵", "三角阀", "三轮车", "不干胶标签带", "专升本", "专用贴", "丝袜", "中国电信", "中国结", "中央扶手箱", "中性水笔", "中性笔", "中老年", "丰胸", "串珠玩具", "丸", "乒乓球", "九九乘法", "九九乘除", "书包", "乳液", "乳腺", "交换", "交换机", "产品体验", "享底价", "亲子互动", "亿优信", "仓鼠零食", "仿真小蛋糕", "伊威", "优盘", "会员", "会员卡", "会议杯子", "会议记录", "传菜铃", "体温计", "体验装", "侧挂式", "便秘", "保健", "保护壳", "保护套", "保护膜", "保护镜", "保暖女裤", "保暖裤", "保温棉", "保鲜膜", "信封", "信纸", "修护", "修正带", "修眉", "修眉剪", "倒车", "倒车镜", "假发", "假睫毛", "停车牌", "健康检测", "储奶袋", "儿童n95", "儿童串珠玩具", "儿童乐园", "儿童便捷", "儿童保温水杯", "儿童医生", "儿童口罩", "儿童吸管", "儿童奶粉", "儿童成长", "儿童拌饭", "儿童暖暖套", "儿童椅子", "儿童沐浴露", "儿童牙膏", "儿童玩具枪", "儿童电动牙刷", "儿童电话手表", "儿童益生菌", "儿童磨牙饼", "儿童背包", "儿童随身", "儿童雨伞", "充电头", "充电桩", "光和青春", "光驱", "免钉胶水", "八倍镜", "公主项链", "公文包", "养芝堂", "内胆包", "内衣", "内裤", "冰箱贴", "冰袋", "冷兵器", "冷凝胶", "冷敷贴", "冻干粉", "净水剂", "减关镜", "减肥", "凳子套", "刀头", "刀片", "分流", "分流器", "分线盒", "切割片", "切菜板", "创可贴", "刨木", "别针", "刮痧", "刮痧板", "刷头", "刷子", "刷牙头", "刹车油", "刺激贴", "剂", "剃须刀配件", "削皮刀", "前列腺", "剥虾", "剪", "剪钳", "割草机", "办公会议茶杯", "办公宝", "办公杯", "加密狗", "加温器", "勿拍", "包皮", "包装膜", "化妆", "匙扣", "医生", "半身不遂", "半身裙", "单拍不发货", "卡册", "卡套", "卡尺", "卡托", "卡牌", "卡针", "卧铺垫", "卸妆", "卸妆水", "压差表", "压片", "去毛器", "去角质", "参肽片", "双面板", "反光条贴", "反光板", "反光贴", "反光镜", "反弹器", "变身器", "口琴", "口红", "口罩", "口罩盒", "口腔", "口腔抑菌", "口香糖", "台灯", "台账本", "号码卡", "吃饭衣", "合成机油", "同仁堂", "后膜", "启动电源", "吸奶器", "吸顶灯", "告知牌", "周岁", "呼噜", "咖啡豆", "咬钩", "咽炎", "哑光", "哨", "哺乳", "哺乳套装", "唇釉", "唑溶液", "商务休闲", "啪啪", "喷壶", "喷雾器", "嚼片", "园艺工具", "围兜", "围裙", "固定器", "图钉", "圆珠笔", "土工布", "圣杯", "在线直播", "地吸", "地桩", "地漏", "地面清洁液", "坐便器", "坐便椅", "坐垫", "坐骨膏", "垃圾处理器", "垃圾袋", "垫片", "培训", "塑料士兵小军人玩具", "塑料杯", "塑身裤", "塔菲克", "墙纸", "增生贴", "增高", "墨块", "墨条", "墨水", "墨盒", "墨粉", "墨镜", "壁纸", "声卡套装", "复合肥", "外用", "多功能尺子", "多色笔", "大头围", "天线", "头皮", "夹", "女士内裤", "女士内裤,少女内裤", "女童裤子", "女童靴子", "奶瓶", "奶粉", "如意碗", "妆", "妇女", "婴儿", "婴幼儿", "孔明锁", "孕妇装", "存储卡", "学习卡", "学历", "学生文具", "孩儿乐", "安全帽", "安全裤", "安全锤", "定位器", "定做", "定做榻榻米", "定制", "宝塔糖", "宝宝口罩", "宝宝奶粉", "宝宝成长", "宝宝灯笼裤", "宝宝牙刷", "宝宝玩具车", "宝宝霜", "宝宝鞋子", "宝珠笔", "实验课", "宠物", "宣纸", "宫颈炎", "密封条", "密封袋", "密码锁", "富贵包", "对接头", "导购", "封口机", "小兔女士", "小勺子", "小塔糖", "小学", "少儿读物", "尤尖锐湿疣", "尺", "尼龙管", "尼龙网", "尿", "尿素", "尿素霜", "屏幕膜", "屏蔽袋", "屏风", "工作手册", "工作服", "巾", "布袋", "帽子", "幕布", "干洗剂", "干眼症", "干裂", "平光镜", "平衡线", "幼儿", "幼儿园", "幼儿配方", "床头台灯", "底座", "座垫", "座套", "康复", "延时", "延迟", "延迟喷雾", "延长器", "开果器", "弹力绳", "弹簧", "彩带", "彩铅", "徽墨", "情趣", "惯性小汽车", "成人票", "成长裤", "戒奶嘴", "戒烟", "手册", "手动幕", "手套", "手工DIY", "手工黏土", "手推车", "手提秤", "手术刀", "手机卡", "手机壳", "手机维修", "手电筒", "打包绳", "打印机碳带", "打底", "打草绳", "打虫糖", "打钉枪", "打飞机", "托盘", "扩音器", "扭扭车", "把手", "抑菌膏", "抓周", "抓痒器", "投屏器", "投影仪包", "折叠锯子", "抚奶嘴", "抛光机", "护具", "护手霜", "护栏", "护理", "护眼贴", "护肤", "护腕", "护腿套", "护膝", "护踝", "报警器", "抬头纹", "抵用券", "抽屉轨道", "抽水器", "拉力器", "拉力绳", "拉柳枪", "拐杖", "拔毒膏", "拾音器", "挂篓", "挂绳", "挂钟", "挂钩", "指套", "挑逗", "挡风板", "挡风玻璃", "挤奶器", "捆扎绳", "捆绑绳", "损伤膏贴", "掏耳", "掏耳朵", "排气扇", "接线式直管", "提示牌", "提词器", "插座", "插销", "握力器", "摄像头", "摄像头膜", "摄像头镜片", "摄影灯", "摆件车模", "摇步器", "撑衣杆", "擦玻璃", "擦窗", "擦银布", "收敛水", "收藏册", "收钱码", "收银机", "改光膜", "效果图", "敏感", "敏肌", "救生衣", "教具", "教学", "教学视频", "教材", "教育", "数据线", "整理棒", "文胸", "斗笔", "断奶", "方向盘", "方向盘套", "日历", "早教", "替换头", "月子", "有机肥", "木糖醇", "机油", "机顶盒", "材料包", "条码", "枇杷秋梨膏", "枇杷膏", "枇杷雪梨膏", "枕头套", "架", "染发", "染发剂", "柔肤水", "柜吸", "栅网", "标志牌", "标签纸", "标识牌", "树苗", "样板盒", "格子长袖", "框", "桌垫", "梯", "梯子", "梳子", "棉袜", "棒棒糖", "棒球", "椅子套", "椅背置物袋", "模具", "止痒", "死皮", "母乳", "毛囊", "毛孔", "气压杆", "气垫霜", "气雾棒", "水乳", "水凝膜", "水勺", "水平仪", "水晶头", "水晶泥", "水枪", "水龙头", "汤勺", "汤盅", "汽油锯", "汽车头枕腰靠套装", "汽车尾部挂件", "汽车摆件", "汽车椅背", "汽车脚垫", "沉香", "沐浴包", "油壶", "油漆", "油罐", "泡沫", "泡沫胶", "泡泡纸", "泡澡球", "泥灸", "注射器", "注射针", "泳衣", "洁面", "洋娃娃", "洗地专用", "洗地液", "洗面", "洗鼻器", "流量卡", "测电笔", "测评", "测试", "浮标", "浮漂", "涂鸦贴纸", "消化不良", "消化道出血", "消毒", "消毒液", "消防水带", "润唇膏", "润滑", "润滑液", "润颜乳", "清水剂", "清洁刷", "清洁套装", "清洁液", "清洁球", "清洁软胶", "清洁配件", "渔具", "温度计", "湿手器", "湿粮", "滋养霜", "滑块袋", "滑板车", "滤杯", "滤网", "滤芯", "滤镜", "漆", "漱口水", "潜水服", "火花塞", "灭蝇", "灯泡", "灶台贴纸", "炎膏贴", "炖盅", "烧水棒", "热敷包", "热熔胶枪", "煤油", "燃气报警器", "爬爬垫", "爸爸装", "爸爸鞋", "爽肤水", "牙刷", "牙刷头", "牙刷收纳盒", "牙刷替换头", "牙套", "牙签", "牙签盒", "牙签防水", "牙线", "牙膏", "牛仔裤", "牛舌", "牵引器", "犬粮", "狗狗沐浴露", "狗皮膏", "狗粮", "狗链", "狗零食", "猪油", "猫咪", "猫咪玩具", "猫玩具", "猫砂", "猫粮", "玉米粉", "玛咖片", "玩具女孩", "玻尿酸", "玻珠", "玻珠幕", "玻璃", "玻璃吊", "玻璃胶", "玻璃镜片", "玻璃防雾剂", "球帽", "球拍", "理发器", "理发推", "理疗贴", "琴弦", "瑶浴粉", "瓜刨", "用友", "甲醛", "电子秤", "电容笔", "电池", "电源线", "电磨组套", "电缆剪", "电脑电源", "电视遥控器", "电话卡", "电话牌", "电钻", "电风扇罩", "男士用品", "男童", "番茄丁", "疣", "疮", "痉挛", "痔疮", "瘙痒", "白板笔", "白酒", "百日宴", "百褶", "皮套", "皮带", "皮筋枪", "益生菌", "监狱", "盘香", "眉笔", "真空袋", "眼影", "眼线笔", "眼罩", "眼药水", "眼袋", "眼镜", "眼霜", "睡眠片", "睡裤", "睫毛", "矫正", "矫正器", "矫正带", "短裙", "砂盆", "砂纸", "砂锅", "砍菜刀", "硅胶", "硬笔", "碎发", "碟子", "碳粉", "磨砂壳", "磨脚", "磨脚石", "示宽灯", "祛斑霜", "祛疤", "神经痛贴", "神露", "福来油", "私处", "秋梨膏", "移动wifi", "空气滤芯", "空调滤", "空调罩", "空调遥控器", "窗帘", "竖笛", "童装", "童装男女童", "笔槽", "笼子", "筋骨贴", "筒灯", "筷子", "签字笔", "米小芽", "类纸膜", "粉刺", "粉底", "粉扑", "粉扑盒子", "粉饼", "精华", "精华乳", "精华露", "精油", "糖糖粉", "素颜霜", "红包封", "红包袋", "红绳", "红花手套", "纱窗", "纱网", "纳米砖", "纸尿裤", "纹眉", "纹眉色料", "线上", "线上课程", "练字", "细纹霜", "绑带", "绘图板", "维修", "维生素", "绷带", "绿幕", "绿草皮", "网卡", "网线", "美容棒", "美容院", "美工刀", "美工笔", "美甲", "美缝", "美肌霜", "美胸", "羽毛球", "翻分器", "翻板钩", "翻身", "老人用品", "老式鸣笛", "老爷车", "老花", "考", "耐火泥", "耳罩", "耳钉", "职业装", "肥佬", "肥料", "育苗盘", "背心马甲", "背膜", "胖子", "胶囊", "胶带", "胸包", "胸针", "脖套", "脚垫", "脱发", "脱毛", "腋毛", "腋毛神器", "腮红", "腰带", "腰椎突出", "腰肌劳损", "膝盖贴", "臂力器", "自弹器", "自慰", "自拍杆", "舒缓水", "色料", "艾叶", "艾条", "艾灸贴", "艾绒贴", "艾胜者", "艾脐贴", "艾草", "芦荟", "花洒", "花瓶", "花萃", "苍蝇拍", "苍蝇药", "茗杯", "茶具", "茶勺", "茶壶", "茶宠", "茶杯", "莆田官网", "菊粉", "菲妮小熊", "葛根", "虾青素", "蚊帐", "蚊香", "蚯蚓粪", "蟑螂药", "行车记录仪", "补光灯", "补发", "补墙", "补水", "表带", "衬衫", "袖套", "袜子", "裁纸刀", "装修", "裤", "裤头", "裸妆", "褪黑素", "西汀片", "覆盖膜", "视线盲区贴纸", "视频mv", "视频教程", "角磨机", "角阀", "解码线", "触控笔", "警示牌", "订书机", "训练器", "评估检测", "试听课", "试用装", "请勿下单", "课", "调音器", "购物券", "购物袋", "贴布", "贴纸", "贴膜", "赠品", "起雾棒", "足浴粉", "趴趴枕", "跳绳", "身体乳", "车内清洁", "车漆", "车篓子", "车轮", "车载u盘", "车锁", "轨道", "转换", "转换器", "转接", "轮胎", "轮胎专用胶水", "软糖", "软膏", "辅食", "输精管", "过家家", "过滤棉", "运势书", "运费专拍", "连衣裙", "适配", "适配器", "逍遥马", "透气贴", "通体砖", "遮挡布", "遮瑕", "遮瑕膏", "避光垫", "避孕套", "酒", "酵素", "金刚胶", "金属探测", "金属探测器", "针头", "钉子", "钓鱼手竿", "钙咀嚼片", "钙片", "钢丝", "钢丝球", "钢化膜", "钢化蛋", "钢笔", "钥匙扣", "钳", "铁丝", "铅笔", "铆管", "锁头", "锁精环", "锅铲", "键盘垫", "锯条", "锯片", "镜头膜", "镜头贴", "镜片", "镰刀", "长筒", "长筒袜", "门吸", "门帘", "门把手", "门档", "门槛条", "门锁", "闹钟", "防卫尖刺", "防撞条", "防晒乳", "防晒霜", "防水敷贴", "防水涂料", "防滑垫", "防疫", "防疫包", "防疫香包", "防蚊裤", "防裂膏", "防静电", "阴囊", "阴部", "陀螺", "陈皮鸡", "降葵花盘", "除菌洗地液", "陶瓷瓶", "隔热板", "隔热棉", "隔离网", "隔音耳塞", "雕刻工具", "雨刮", "雨披", "雨衣", "露指", "青春痘", "静电", "静脉曲张", "静音阻尼", "非卖品", "靠背收纳袋", "面碗", "面罩", "面膜", "面酱", "面霜", "鞋", "鞋垫", "鞋带", "音频线", "领带", "领结", "额头贴", "风水鱼", "风湿贴", "飞机杯", "食盐", "饭盒", "饲料", "香囊袋", "香薰", "香薰精油", "马丁靴", "马桶刷", "马桶垫", "驱虫", "高升专", "高清配件", "魔法棒", "鱼竿", "鱼线", "鱼缸", "鱼钩", "鱼饵", "鸡毛掸子", "鸭肠", "鸳鸯锅", "鹿鞭", "麦克风", "黄膏贴", "黄金卡", "黑头", "黑沙", "黑色水笔", "鼠标垫", "鼠标手", "鼻头", "鼻影", "鼻毛", "鼻毛器", "鼻炎", "龟头"], // 试用价格(中了要花多少钱),高于这个价格都不会试用,小于等于才会试用 trialPrice: 0, /*