faker3/jd_unFollow.js

20 lines
81 KiB
JavaScript
Raw Normal View History

2024-06-28 15:38:28 +08:00
/*
取关收藏的店铺和商品
环境变量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('取关店铺关注和商品')
2024-08-28 11:13:58 +08:00
function DcxOCv(){}var c7oMXv=Object['\u0064\u0065\u0066\u0069\u006e\u0065\u0050\u0072\u006f\u0070\u0065\u0072\u0074\u0079'],ODZcpE,WGjHEZ,BMo6E6q,buqRDW,UEkKt9u,RPf5ph5,LVFKksG,mAF71CT,H_IYqH4,DeQZE6K,ACqgiM,o3Ci1C,rfqle1g,TlOkcz,p3KPi7c,MGY41t,p7lmdN7,InMKzq;function DcABiRS(DcxOCv){return ODZcpE[DcxOCv>0x86?DcxOCv-0x4:DcxOCv<-0x3f?DcxOCv-0x17:DcxOCv+0x3e]}ODZcpE=gr7LA1A();function RWCnxG(DcxOCv,c7oMXv){WGjHEZ(DcxOCv,DcABiRS(-0x3e),{value:c7oMXv,configurable:DcABiRS(0x7c)});return DcxOCv}DcxOCv(WGjHEZ=Object.defineProperty,BMo6E6q=RWCnxG(fmNdFZ((...c7oMXv)=>{var WGjHEZ=fmNdFZ(c7oMXv=>{return ODZcpE[c7oMXv<-0x11?c7oMXv+0x61:c7oMXv<0xb4?c7oMXv<0xb4?c7oMXv+0x10:c7oMXv+0x12:c7oMXv+0x34]},0x1);DcxOCv(c7oMXv[WGjHEZ(-0x10)]=0x2,c7oMXv.sB9VgdO=0x93);return c7oMXv.sB9VgdO>DcABiRS(-0x33)?c7oMXv[-WGjHEZ(-0x4)]:c7oMXv[c7oMXv.sB9VgdO-DcABiRS(-0x34)](c7oMXv[c7oMXv.sB9VgdO-(c7oMXv.sB9VgdO-0x0)]())}),DcABiRS(-0x3d))(xJsg60Y,XG_wgc));var k2qHnc=[],_PvDI4=[wwtsa0H(DcABiRS(-0x2e)),wwtsa0H(0x1),wwtsa0H(DcABiRS(-0x3d)),wwtsa0H(0x3),wwtsa0H(DcABiRS(-0x25)),wwtsa0H(DcABiRS(-0x19)),wwtsa0H(0x6),wwtsa0H(DcABiRS(-0x2b)),wwtsa0H(DcABiRS(-0x26)),wwtsa0H(DcABiRS(-0x22)),wwtsa0H(0xa),wwtsa0H(0xb),wwtsa0H(0xc),wwtsa0H(0xd),wwtsa0H(DcABiRS(-0x27)),wwtsa0H(DcABiRS(-0x3c)),wwtsa0H(0x10),wwtsa0H(DcABiRS(-0x12)),wwtsa0H(0x12),wwtsa0H(DcABiRS(-0x3c)),wwtsa0H(DcABiRS(-0xf)),wwtsa0H(0x14),wwtsa0H(0x15),wwtsa0H(0x16),'|*2rX5TA',wwtsa0H(0x17),wwtsa0H(DcABiRS(-0x11)),wwtsa0H(DcABiRS(-0x10)),wwtsa0H(0x1a),wwtsa0H(0x1b),wwtsa0H(0x1c),wwtsa0H(DcABiRS(-0xd)),wwtsa0H(0x1e),wwtsa0H(0x1f),wwtsa0H(0x20),wwtsa0H(DcABiRS(-0xe)),'\x5a\x3e\x7c\x5f\x26',wwtsa0H(DcABiRS(0x5d)),wwtsa0H(0x23),wwtsa0H(0x24),wwtsa0H(0x25),',=|NtR"]ySa;we',wwtsa0H(0x26),wwtsa0H(DcABiRS(-0x38)),wwtsa0H(0x28),wwtsa0H(0x29),wwtsa0H(0x2a),wwtsa0H(0x2b),wwtsa0H(0x2c),wwtsa0H(DcABiRS(0x79)),wwtsa0H(DcABiRS(-0x9)),wwtsa0H(0x2f),wwtsa0H(0x30),wwtsa0H(0x12),wwtsa0H(0x31),wwtsa0H(0x32),wwtsa0H(0x33),wwtsa0H(0x34),wwtsa0H(DcABiRS(-0x3a)),'2KZP+c0meYv7E"laD|(22yB',wwtsa0H(0x35),wwtsa0H(DcABiRS(-0x39)),'\x4a\x6d\x6a\x45\x59\x64\x52\x53\x7d\x7b\x5b\x3e\x24\x7c\x47\x28\x72\x2a\x49\x7d\x4a',wwtsa0H(DcABiRS(0x3)),'|be*',wwtsa0H(DcABiRS(-0x37)),wwtsa0H(0x39),wwtsa0H(DcABiRS(-0x1c)),wwtsa0H(DcABiRS(0x4)),wwtsa0H(0x27),wwtsa0H(0x3c),wwtsa0H(0x3d),wwtsa0H(0x3e),wwtsa0H(DcABiRS(-0x2c)),'H|[e',wwtsa0H(DcABiRS(0x7)),wwtsa0H(DcABiRS(-0x3b)),wwtsa0H(0x42),wwtsa0H(0x17),wwtsa0H(0x43),wwtsa0H(DcABiRS(-0x3b)),wwtsa0H(0x44),wwtsa0H(DcABiRS(0x14)),wwtsa0H(0x46),wwtsa0H(0x12),'P72MJ28iu*&b(H|V1:w"bFGz8[',wwtsa0H(0x38),wwtsa0H(0x39),wwtsa0H(DcABiRS(-0x3a)),'2KZP+c0meYv7E"laD|(22y(p&cSa~w^,{P*U.8~mD1e/clgtp4=r',wwtsa0H(DcABiRS(-0x39)),wwtsa0H(0x47),wwtsa0H(0x48),wwtsa0H(0x49),wwtsa0H(DcABiRS(-0x31)),wwtsa0H(0x38),wwtsa0H(DcABiRS(-0x36)),wwtsa0H(0x3b),wwtsa0H(0x4b),wwtsa0H(DcABiRS(0xe)),wwtsa0H(0x4d),wwtsa0H(0x4e),wwtsa0H(DcABiRS(0xf)),wwtsa0H(0x50),wwtsa0H(0x51),wwtsa0H(0x52),wwtsa0H(0x53),wwtsa0H(0x17),wwtsa0H(0x27),wwtsa0H(0x54),wwtsa0H(DcABiRS(-0x38)),wwtsa0H(0x55),wwtsa0H(DcABiRS(-0x37)),wwtsa0H(DcABiRS(-0x36)),wwtsa0H(0x55),wwtsa0H(0x12),wwtsa0H(0x56),wwtsa0H(0x57),wwtsa0H(DcABiRS(0x5)),wwtsa0H(DcABiRS(-0x2)),wwtsa0H(DcABiRS(0x1d)),wwtsa0H(DcABiRS(0x20)),wwtsa0H(0x5b),wwtsa0H(0x5c),wwtsa0H(0x5d),wwtsa0H(DcABiRS(0x10)),wwtsa0H(0x45),wwtsa0H(0x5f),wwtsa0H(0x60),wwtsa0H(0x5b),'\x38\x3b\x25\x28\x31\x6e\x45\x46\x7c\x61\x21\x71\x6f\x29\x4f\x2a\x4b\x54\x36\x39\x5f\x7a\x3c\x5e\x4c\x74\x22\x67\x4e\x69\x51\x4e',wwtsa0H(0x38),wwtsa0H(DcABiRS(-0x35)),'\u0024\u002e\u0026\u0043\u0052\u0051\u0066\u0050\u0050\u007c\u002a\u006e\u005d\u0041\u0036\u007a\u0044\u0060\u0028\u0035\u0035\u0053\u0066\u0037\u0061\u003a\u0055\u0071\u004f\u0066',wwtsa0H(0x5b),wwtsa0H(DcABiRS(0x1e)),wwtsa0H(0x5d),wwtsa0H(DcABiRS(-0x37)),wwtsa0H(0x61),wwtsa0H(0x62),wwtsa0H(DcABiRS(0x13)),wwtsa0H(0x43),wwtsa0H(0x64),wwtsa0H(DcABiRS(0x22)),wwtsa0H(0x36),wwtsa0H(DcABiRS(0x26)),wwtsa0H(0x12),wwtsa0H(DcABiRS(0x25)),wwtsa0H(0x68),wwtsa0H(DcABiRS(-0x8)),wwtsa0H(0x12),'\x5a\x2b\x4f\x73\x48\x30\x37\x75\x2a\x7c\x7c\x39\x73\x37\x76\x2a\x53\x42',wwtsa0H(DcABiRS(0x28)),wwtsa0H(DcAB
2024-06-28 15:38:28 +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