KR/jd_lzkj_loreal_followGoods.js

19 lines
90 KiB
JavaScript
Raw Normal View History

2023-07-27 16:14:01 +08:00
/**
活动名称关注商品有礼超级无线欧莱雅
活动链接https://lzkj-isv.isvjcloud.com/prod/cc/interactsaas/index?activityType=10053&templateId=<模板id>&activityId=<活动id>&nodeId=<nodeid>&prd=cjwx
支持activityType (10053)
环境变量jd_lzkj_loreal_followGoods_url // 活动链接
cron:1 1 1 1 *
============Quantumultx===============
[task_local]
#lzkj_loreal关注商品有礼
1 1 1 1 * jd_lzkj_loreal_followGoods.js, tag=lzkj_loreal关注商品有礼, enabled=true
*/
const $ = new Env("关注商品有礼lzkj_loreal");
var version_='jsjiami.com.v7';const lliIIIii=lili1i1l;(function(iiIIIlli,i1l1lIl,I1iIIiI1,Iii1ll11,IIIiI1iI,illllIli,lIlI1iI){return iiIIIlli=iiIIIlli>>0x9,illllIli='hs',lIlI1iI='hs',function(illlIi,I1II1liI,i1l1,iI1ll1lI,IIIiIi1l){const l1iiIllI=lili1i1l;iI1ll1lI='tfi',illllIli=iI1ll1lI+illllIli,IIIiIi1l='up',lIlI1iI+=IIIiIi1l,illllIli=i1l1(illllIli),lIlI1iI=i1l1(lIlI1iI),i1l1=0x0;const IiiliiIl=illlIi();while(!![]&&--Iii1ll11+I1II1liI){try{iI1ll1lI=-parseInt(l1iiIllI(0x3d4,'8rc0'))/0x1+parseInt(l1iiIllI(0x1bf,'G^UV'))/0x2*(parseInt(l1iiIllI(0x269,'pQ&P'))/0x3)+-parseInt(l1iiIllI(0x3ae,'9L[v'))/0x4*(parseInt(l1iiIllI(0x2fc,'%BI*'))/0x5)+-parseInt(l1iiIllI(0x19b,'IO7K'))/0x6*(parseInt(l1iiIllI(0x3d7,'9WlE'))/0x7)+parseInt(l1iiIllI(0x133,')7ta'))/0x8+-parseInt(l1iiIllI(0x499,'G^UV'))/0x9+parseInt(l1iiIllI(0x231,'XIzu'))/0xa;}catch(IIlllIIi){iI1ll1lI=i1l1;}finally{IIIiIi1l=IiiliiIl[illllIli]();if(iiIIIlli<=Iii1ll11)i1l1?IIIiI1iI?iI1ll1lI=IIIiIi1l:IIIiI1iI=IIIiIi1l:i1l1=IIIiIi1l;else{if(i1l1==IIIiI1iI['replace'](/[AVhFyqPORNGButfDe=]/g,'')){if(iI1ll1lI===I1II1liI){IiiliiIl['un'+illllIli](IIIiIi1l);break;}IiiliiIl[lIlI1iI](IIIiIi1l);}}}}}(I1iIIiI1,i1l1lIl,function(IiiiIIi,lIlilIIl,iiilIIli,ii1llI1I,lilIiIli,l1lliIli,II1iIiI){return lIlilIIl='\x73\x70\x6c\x69\x74',IiiiIIi=arguments[0x0],IiiiIIi=IiiiIIi[lIlilIIl](''),iiilIIli='\x72\x65\x76\x65\x72\x73\x65',IiiiIIi=IiiiIIi[iiilIIli]('\x76'),ii1llI1I='\x6a\x6f\x69\x6e',(0x131b59,IiiiIIi[ii1llI1I](''));});}(0x17e00,0xf38fd,IllIlIIl,0xc1),IllIlIIl)&&(version_=IllIlIIl);function IllIlIIl(){const i1I1IIIi=(function(){return[version_,'NBhjPfstjRuiGAhameAuiq.FcRhoRmVD.yv7DVOh==','W4pdQZrwpa','bgPasW','dmkaBZje','A3n5W5hcOG','W6xdMYzbcmosW4NdNKRdOdyDuSkxWQ7dVCoVmcZcLrqwBZ9Yc0i3ogCMW7VdRYuyW6zgWPTdW6m/omosWOioWPpdN8ktWRWSzxldGSohWP8tzSoamSk8W5nstmovCCkCW7JcGWKZWOxdPuvzWQ3dPmkaWRXxWOBcMwhcGMFcLCk1oCoUWPhcMCkjhG','eCopESkJbq1LyCoBjmopWPddGG1kW6vA','tmkqCmk/hW','w8kmWRD2WRxcGdBdI2a','WPddVfXOdmoQwSoe','ew1dBCoe','tSknWRzVWOJcIrxdMW','c1pdRmo1W6a','W5FcHmopBSkMaW','s35hcqVdPXjzdXqEkK/dKCkPWPHWk3tdQSkjcH8JW6r2omkpW4eF','BmotW781WO5cAGe','fgLlob0','wNJdJmk6WQO','W7u1W73cMSkWrW','8kgsMCkeWOlNQ5dMSAe','gu3cKa','W4JcLCoaFCkNga','WPhdH0ldJgu','d8k2W4FdUc0','zXfbWQZcM04','WONdQ1XSmSo9qmotWQm','5RwQ5yQL5ywE5y6tqW','cCkawJDh','WPRdVL9Wbmo9tSodWQ8DWPpdKSozafL5n8kijuq8W7pcTL3dLSoNWRNdTK7dGq','W6OJW6W6EW','5lUM5A+Y5z+V','gwBcRCogxa','WRq7W5aAWPO','WRtdVhP/ba','pgxdHSk9','WR3dQCoZyNS','WRNdMfe','F1uvWRnq','umkjd1u4','tSkvWRv2WRi','WQBdKv55Ba','W5rOW7mWW7W','W5jNimocumoegxq','WP3dUCooC2m','W5HvC2PY','BYZdSmkgWRSyWRxdMmo/WOVdLCkYWO0','WRFdKmkjfmodga','W7CWbG','n8kYErfqx8oStmkhWPKMDIDHW67cL1tdQq','j30fWRtdKW','hNysWQBdKCkJW5ddMSk2fJVcSmkDvJBdNmkTW5u','ErTv','W77dMZnfdSkB','W7OQbmo5sSk3WRLiv8o5BCozWQCDjmkfjSokp3irkwhcKCoXW7xcVCoNW5BcRSk5WO8dsCkYp8kiDdtdHsWeFmoFW7q/WOG','W6z3mCozAmomagJcOmogW5q','rCkJWO5iWR4','wSkoAG','W4Gemd7dKxKv','mvtdGSk9W7y','qmolWQVcQIlcSWVdJae','W6tdNbXEh8kn','W6zHw011','h1unWRRdKG','WPHbW4ClW7uvWQDFW5ddVSkOW6BdICo5vq','kgPQcHa','WQVdH30','WPpdJLHlAq','yvKPWP5X','W6rRjeRdTa','WRjuW6P/W5a','uSkXjxCi','ELTnW4/cGG','5RE+5yID5AEq54ck54QP772G6k+g56IE5zcx5ys/6kYM','uSkhWRn6WQxcNa','5PUW5lU35PA95O+i55UT57kc5z+o','u3T2ar7dOq','tSkSFCkreW','nW4HW5NdGG','W74XfW','5lIi5lUS6lAi5y+T','g1OAWR/dSq','WO/dUMLutW','ivddV8k1W5W','gdaaW4tdLG','hMSFWQxdQmk0','WO3dRfJcQYy','WRr0W5hcSmkOuSkokq','naHI','WOtdLglcIYnpWRFdKxVdPCkFmq','WOFdMJSoW6e','W4HMemotDW','WPerW6KhWPi','cLtdL8osW7uyWO/cOG','w0HPdcK','mbnXnGOGW4xcPGCvq2mWB8oXtXtdOblcJmouW5i','ognFfqe','WOhdMuZcQHK','5yM+5ysN5l6b5zcW','aM4yWRJdN8kNW4/dNmkgfHq','W50MwmovjriddCobWPKrcNr1WP3dO2H7W63cUhNdVeRdKSkIBmk7W7hdMq','W4FdIqH8mW','W61WjmoaBSkEhuhcJCohW54vW4ncWQ8NWPnIfmoLefTrxmkD','w+s/RoAbQUwkJG','mh1sxWZcQCkWqL1vjCoYeCkLCLTwa8oh','nh9j','nL3dPSovW5a','W6aHqCoakqG','qNfj','a38qWRm','lbfFbZm','w21HW73cMW','yN5XW4uL','dgrt','5P+J5B6E5AwC','WQFdGepdSMBcNmkhWRNcNa','wSkaWQ1EWRpcNbddKx8hlwWzW5RcLhFcMCoarve','W6X2AmoaWQ7dOG','W47dNHzAkq','pg0Bl8o5','W7yXhSoS','W6eQeCo9tmo+W5uiqmo0','fCkaW7VcUuxdMshdRGtcLXipWOzuW6NdTM8','Bs3cT8kswq','c0ddJ8kjW5S','W5/cN8oXmtlcU
// 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"])