mirror of
https://github.com/shufflewzc/faker3.git
synced 2024-11-14 07:29:18 +08:00
20 lines
38 KiB
JavaScript
20 lines
38 KiB
JavaScript
|
/*
|
|||
|
取关(收藏的)店铺和商品
|
|||
|
环境变量:JD_UNFOLLOW_PIN_FILTER_GOODS // 不取关商品收藏的账号(填入pin,多个用@分割)
|
|||
|
JD_UNFOLLOW_PIN_FILTER_SHOP // 不取关店铺关注的账号(填入pin,多个用@分割)
|
|||
|
|
|||
|
cron:15 0-23/12 * * *
|
|||
|
============Quantumultx===============
|
|||
|
[task_local]
|
|||
|
#取关(收藏的)店铺和商品
|
|||
|
15 0-23/12 * * * jd_unfollow.js, tag=取关(收藏的)店铺和商品, enabled=true
|
|||
|
|
|||
|
注:系统可能会存在无法被正常取关的异常商品或异常店铺
|
|||
|
|
|||
|
*/
|
|||
|
|
|||
|
const $ = new Env('取关店铺关注和商品')
|
|||
|
var iil='jsjiami.com.v7';const li1i1i=iii1II;(function(ii1ii1,llllI,lllil1,iil1il,ilil1I,i11il1,ii1iiI){return ii1ii1=ii1ii1>>0x2,i11il1='hs',ii1iiI='hs',function(lllilI,ilil11,illlI1,IIIl11,I1lIi1){const iiilii=iii1II;IIIl11='tfi',i11il1=IIIl11+i11il1,I1lIi1='up',ii1iiI+=I1lIi1,i11il1=illlI1(i11il1),ii1iiI=illlI1(ii1iiI),illlI1=0x0;const liiIIi=lllilI();while(!![]&&--iil1il+ilil11){try{IIIl11=parseInt(iiilii(0x2df,'DgzP'))/0x1+parseInt(iiilii(0x1bb,'%PP8'))/0x2*(parseInt(iiilii(0x28d,'%92F'))/0x3)+parseInt(iiilii(0x2fa,'CrWs'))/0x4+-parseInt(iiilii(0x2a6,'Ccy^'))/0x5+-parseInt(iiilii(0x26d,'DdLN'))/0x6+parseInt(iiilii(0x279,'d*M['))/0x7*(-parseInt(iiilii(0x30e,'yuGR'))/0x8)+-parseInt(iiilii(0x1fd,'@@XF'))/0x9*(-parseInt(iiilii(0x2b1,'Gy9K'))/0xa);}catch(lil11I){IIIl11=illlI1;}finally{I1lIi1=liiIIi[i11il1]();if(ii1ii1<=iil1il)illlI1?ilil1I?IIIl11=I1lIi1:ilil1I=I1lIi1:illlI1=I1lIi1;else{if(illlI1==ilil1I['replace'](/[NEORJYAGXwSeTkMb=]/g,'')){if(IIIl11===ilil11){liiIIi['un'+i11il1](I1lIi1);break;}liiIIi[ii1iiI](I1lIi1);}}}}}(lllil1,llllI,function(Iliii1,iIiIi,iil1ll,iiilil,iil1li,lillIl,iIiIl){return iIiIi='\x73\x70\x6c\x69\x74',Iliii1=arguments[0x0],Iliii1=Iliii1[iIiIi](''),iil1ll='\x72\x65\x76\x65\x72\x73\x65',Iliii1=Iliii1[iil1ll]('\x76'),iiilil='\x6a\x6f\x69\x6e',(0x15f819,Iliii1[iiilil](''));});}(0x318,0x25a54,Iii11l,0xc8),Iii11l)&&(iil=`\x410`);const jdCookie=require('./jdCookie'),notify=require(li1i1i(0x2f8,'&4fN')),common=require(li1i1i(0x237,'1nd)')),{H5st}=require(li1i1i(0x321,'@@XF'));console['log'](''),console[li1i1i(0x226,'(GOI')](li1i1i(0x1e0,'DdLN')+$[li1i1i(0x201,'gmq!')]+li1i1i(0x314,'d*M[')),console[li1i1i(0x2d9,'Gy9K')](li1i1i(0x27b,'(wvw')),console[li1i1i(0x2f3,'Ccy^')]('JD_UNFOLLOW_PIN_FILTER_SHOP\x20//\x20不取关店铺关注的账号(填入pin,多个用@分割'),console[li1i1i(0x2aa,'OJk&')](li1i1i(0x25e,'n&uZ')+$[li1i1i(0x305,'@@XF')]+li1i1i(0x1d3,'DdLN')),console[li1i1i(0x2cb,'JY5F')]('');const pinFilterGoods=(process[li1i1i(0x2c5,'i^PA')]['JD_UNFOLLOW_PIN_FILTER_GOODS']||'')[li1i1i(0x2da,'pNh%')]('@'),pinFilterShop=(process[li1i1i(0x1ae,'d*M[')][li1i1i(0x27f,'%PP8')]||'')[li1i1i(0x225,'@@XF')]('@'),isNotify=![];let cookie='';function iii1II(_0x107a47,_0x544440){const _0x5c60d0=Iii11l();return iii1II=function(_0x353fae,_0x2b413b){_0x353fae=_0x353fae-0x1a0;let _0x1b1d9f=_0x5c60d0[_0x353fae];if(iii1II['ltnhVm']===undefined){var _0xde62bd=function(_0x232608){const _0x2cc370='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x5e9df2='',_0x10116b='';for(let _0x13941a=0x0,_0x55216a,_0x4e6d0a,_0x36fb15=0x0;_0x4e6d0a=_0x232608['charAt'](_0x36fb15++);~_0x4e6d0a&&(_0x55216a=_0x13941a%0x4?_0x55216a*0x40+_0x4e6d0a:_0x4e6d0a,_0x13941a++%0x4)?_0x5e9df2+=String['fromCharCode'](0xff&_0x55216a>>(-0x2*_0x13941a&0x6)):0x0){_0x4e6d0a=_0x2cc370['indexOf'](_0x4e6d0a);}for(let _0x228be7=0x0,_0x102530=_0x5e9df2['length'];_0x228be7<_0x102530;_0x228be7++){_0x10116b+='%'+('00'+_0x5e9df2['charCodeAt'](_0x228be7)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x10116b);};const _0x535974=function(_0x33e378,_0xff6305){let _0x405469=[],_0x538055=0x0,_0x1fc151,_0x487519='';_0x33e378=_0xde62bd(_0x33e378);let _0x2ee4c5;for(_0x2ee4c5=0x0;_0x2ee4c5<0x100;_0x2ee4c5++){_0x405469[_0x2ee4c5]=_0x2ee4c5;}for(_0x2ee4c5=0x0;_0x2ee4c5<0x100;_0x2ee4c5++){_0x538055=(_0x538055+_0x405469[_0x2ee4c5]+_0xff6305['charCodeAt'](_0x2ee4c5%_0xff6305['length']))%0x100,_0x1fc151=_0x405469[_0x2ee4c5],_0x405469[_0x2ee4c5]=_0x405469[_0x538055],_0x405469[_0x538055]=_0x1fc151;}_0x2ee4c5=0x0,_0x538055=0x0;for(let _0x26af3a=0x0;_0x26af3a<_0x33e378['length'];_0x26af3a++){_0x2ee4c5=(_0x2ee4c5+0x1)%0x100,_0x538055=(_0x538055+_0x405469[_0x2ee4c5])%0x100,_0x1fc151=_0x405469[_0x2ee4c5],_0x405469[_0x2ee4c5]=_0x405469[_0x538055],_0x405469[_0x538055]=_0x1fc151,_0x487519+=String['fromCharCode'](_0x33e378['charCodeAt'](_0x26af3a)^_0x405469[(_0x405469[_0x2ee4c5]+_0x405469[_0x538055])%0x100]);}return _0x487519;};iii1II['AiOshJ']=_0x535974,_0x107a47=arguments,iii1II['ltnhVm']=!![];}const _0x33c3af=_0x5c60d0[0x0],_0x31c346=_0x353f
|
|||
|
// 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.d
|