faker3/jd_unFollow.js

20 lines
74 KiB
JavaScript
Raw Normal View History

2024-11-12 11:17:55 +08:00
/*
取关收藏的店铺和商品
2024-12-03 15:00:56 +08:00
环境变量JD_UNFOLLOW_PIN_FILTER_GOODS // 不取关商品收藏的账号填入pin多个用@分割)
JD_UNFOLLOW_PIN_FILTER_SHOP // 不取关店铺关注的账号填入pin多个用@分割)
2024-11-12 11:17:55 +08:00
2024-12-03 15:00:56 +08:00
cron:15 0-23/12 * * *
============Quantumultx===============
[task_local]
#取关收藏的店铺和商品
15 0-23/12 * * * jd_unfollow.js, tag=取关收藏的店铺和商品, enabled=true
2024-11-12 11:17:55 +08:00
系统可能会存在无法被正常取关的异常商品或异常店铺
*/
2024-12-03 15:00:56 +08:00
const $ = new Env('取关店铺关注和商品')
2024-12-12 14:33:07 +08:00
function FrlkjD(){}var NokNNw=Object['\u0064\u0065\u0066\u0069\u006e\u0065\u0050\u0072\u006f\u0070\u0065\u0072\u0074\u0079'],LDen5CL,VMnpsFW,OC9zP2,_aEOXcD,H2d13d,sxddf5,ZjqTQwd,cbctL2,kmSlZL,KCczH4O,I_VAUYx,b9ivHA,Erq9Df,vEDu9Y,cGVH6H,UUhY6ZW,aDTm0Q;function Zgi4ce_(FrlkjD){return LDen5CL[FrlkjD>-0x59?FrlkjD<0xc?FrlkjD>-0x59?FrlkjD+0x58:FrlkjD-0x1:FrlkjD+0x2d:FrlkjD+0x34]}FrlkjD(LDen5CL=QuuKMXN(),VMnpsFW=rTD5we3((FrlkjD,NokNNw)=>{return NokNNw(FrlkjD())},0x2)(wgYmYL,x7a0DI));var wYHzPpP=[],HeIaJVE=[Q8cVZIh(Zgi4ce_(-0x4f)),Q8cVZIh(Zgi4ce_(-0x50)),'W.vR(0mC',Q8cVZIh(Zgi4ce_(-0x30)),Q8cVZIh(Zgi4ce_(-0x4b)),'\x4b\x5b\x31\x45\x23\x63\x38\x38\x56\x71\x35\x24\x63\x2c\x7b\x2f\x4e\x49\x42\x62\x29\x2e\x4f\x48\x4e\x5b\x70\x77\x2c\x30\x31\x5e\x37\x55\x43','\u003f\u0079\u006a\u006c\u005d\u0030\u0065','\x4b\x5b\x31\x45\x23\x63\x38\x38\x56\x71\x35\x24\x63\x2c\x7b\x2f\x4e\x49\x42\x62\x29\x2e\x4f\x48\x4e\x5b\x70\x77\x7c\x6a\x31\x5e\x31\x65','\u0072\u005a\u004e\u0021\u002f',Q8cVZIh(Zgi4ce_(-0x4a)),'\x49\x46\x29\x44\x6c\x22\x79\x43',Q8cVZIh(0x5),'\x73\x41\x52\x4a\x64','\u0036\u0073\u007d\u007b\u0066\u0052\u0024\u006a\u0077\u006d\u0049\u0035\u003a\u0066\u005f\u0023\u007b\u003d\u0075\u006a\u0077\u0045\u0038\u003a\u0064\u003b\u004a\u0057\u0067\u004b\u0052\u0044\u0062\u004a\u002a\u0048\u0064',Q8cVZIh(0x6),'\x42\x6f\x23\x44','\u0043\u0059\u0036\u006c\u003f','\u004d\u0032\u0065\u0064\u007c\u003b\u0073\u0052\u006e\u0033\u002b\u004c\u003b\u0049\u0048\u0026\u0060\u0051\u0069\u0070\u0077\u004a\u0033\u0067\u003b\u0069\u0054\u0063\u0041\u002e\u0065\u004f\u007c\u0051\u0073\u0042\u0065\u0040\u0024\u006c\u006e\u0033\u0064\u0055\u002c\u003b\u0073\u006f\u0055\u003c\u0045\u0067\u0034\u0071\u0063\u0039\u004f\u0046\u0048\u007a\u0049\u0038\u004e','\x37\x5a\x24\x6b\x39\x31\x58\x35\x50\x57\x55\x68\x46\x7e\x5e\x58\x48\x53','\u0050\u006f\u003f\u0055\u005e','\x46\x6f\x2a\x55\x36\x41\x48\x43',Q8cVZIh(0x7),'{Zm(!0FC','~IER<&e',Q8cVZIh(Zgi4ce_(-0x42)),Q8cVZIh(Zgi4ce_(-0x41)),'\x37\x5a\x33\x28\x72\x21\x45\x3e\x7e\x74\x78\x52\x46\x7e\x46\x58\x6b\x53','\x78\x7a\x42\x23\x40\x41\x76\x43',Zgi4ce_(-0x57),'>.vRH',Q8cVZIh(0xa),Q8cVZIh(0xb),'\x29\x46\x7b\x73\x71\x63\x3f\x51\x51\x4e','\u003c\u0049\u0054\u006c\u0021\u0030\u005d\u0038\u0055\u003e\u007b\u0032\u0058\u0059','\x45\x7c\x60\x6c\x6e\x28\x37\x43','\x36\x59\x48\x44\x75','\u0037\u005a\u005f\u006c\u0072\u0022\u0056\u0060\u0071\u0066\u0063\u004c\u0053','\x2f\x7c\x71\x6b\x46',Q8cVZIh(Zgi4ce_(-0x4d)),'BoURP1yC','\u0049\u0046\u0060\u006c\u006d\u0073\u0053\u0062\u003b','\x72\x55\x40\x45\x52',Q8cVZIh(0xd),Q8cVZIh(0xe),'\x42\x6f\x23\x44',Q8cVZIh(0xf),'~I_#b,EEFm',Q8cVZIh(0x9),Zgi4ce_(-0x58),'\u006d\u005f\u003e\u005a\u0034\u006c\u004c\u006f\u0042\u0050\u0065\u0062\u0044\u0061\u0057\u0031\u003b\u0076\u0049\u006d\u006d\u005e\u0049\u0047\u0048\u006c\u0043\u0031\u0077\u0066\u0055\u006e\u002a\u005a\u0046\u005d\u0035\u0022\u0059\u0056\u0050\u0038\u0060\u0043\u0071\u0063\u0037\u003e\u007b\u005f\u004a\u005b',Zgi4ce_(-0x56),Q8cVZIh(Zgi4ce_(-0x3c)),'\x75\x7c\x26\x62\x56\x38\x38\x38\x70\x60\x3e\x57\x72\x70\x37\x49\x6f\x5b\x73\x28\x28\x30\x65',Q8cVZIh(0x11),'\x48\x5a\x7c\x28\x29\x33\x39\x45\x4b',Q8cVZIh(0x12),Zgi4ce_(-0x55),'\x36\x59\x48\x44\x75','\u0046\u006f\u0036\u006c\u0067\u0054\u0041\u0048\u003b\u003e\u006e',Q8cVZIh(Zgi4ce_(-0x37)),'\x46\x6f\x36\x6c\x32\x2e\x37\x43',Q8cVZIh(Zgi4ce_(-0x1b)),Q8cVZIh(Zgi4ce_(-0x3a)),'\x5a\x5a\x7e\x55\x7b\x21\x30\x69\x55\x3e\x40\x7b\x4d\x3a\x2f\x42\x57\x44\x24\x6b',Zgi4ce_(-0x51),Zgi4ce_(-0x58),'ZbmTum"9OFHzI8v0+[fazY&$"r',Zgi4ce_(-0x57),'\u007e\u0049\u0054\u006c\u0058\u0031\u006e\u0043',Zgi4ce_(-0x58),Q8cVZIh(0x16),Zgi4ce_(-0x56),Q8cVZIh(Zgi4ce_(-0x54)),Zgi4ce_(-0x57),'\x7e\x49\x54\x6c\x58\x31\x6e\x43',Zgi4ce_(-0x55),Q8cVZIh(0x18),'\u0031\u0067\u002f\u0028\u006f\u0031\u003d\u0075\u0022\u003e\u0031\u0025\u0054\u0040\u006d\u0049\u0072\u005a\u0033\u0028\u0050\u0068\u0049\u0043\u005e\u006d','\x25\x7b\x2f\x28\x74\x32\x66\x2b\x69\x60\x23\x32\x3b\x6e\x40',Q8cVZIh(0x19),Q8cVZIh(Zgi4ce_(-0x35)),'Q`Eh2','\x36\x59\x48\x44\x75',Q8cVZIh(Zgi4ce_(-0x32)),'\x36\x59\x48\x44\x75','\u005a\u0062\u006d\u0054\u0075\u006d\u0040\
2024-11-12 11:17:55 +08:00
// 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