jdpro/jd_video_task.js

6 lines
139 KiB
JavaScript
Raw Normal View History

2024-06-30 15:19:36 +00:00
/*
1 1 1 1 * jd_video_task.js
*/
const $ = new Env('看视频赚现金-任务');
2024-12-10 14:48:10 +00:00
var ndT6pG,jaBp6W,_hTc0R,EFXmf4,kHuli2,hLLSdE0,bieS2H,ti7_SlX,JDo4nR,DhhqgiM,bzECz0S;const WFXG2do=[0x0,0x1,0x8,0xff,"length","undefined",0x3f,0x6,"fromCodePoint",0x7,0xc,"push",0x5b,0x1fff,0x58,0xd,0xe,null,0x79,!0x1,0x7f,0x80,!0x0,0x88,0x8c,0x8e,0x2,0x9f,0xa0,0xa5,0x89,0xab,0xaf,0xb1,0xbc,0xbd,0xbb,"UA",0xbe,0xc0,0xbf,0x10,0x200,0xf,0x3,0x4,0x3ff,0x1f,0x12,0x20,0x5,0x18,0x11,0xa,0x13,0x40,0xffff,0xdf,0xe0," ",0xc6,0xe3,0xe4,0x1f4,0x7d0,0xc1,0x19,0xef,0xf0,0x100,0x3e8,0x106,0xb8,0xba,0x10a,0x10b,0x109,0x10c,"\u3011",0x114,0x110,"tm",void 0x0,0x10e,0x127,0x128,0x12a,0x13d,"g",0x148,0x149,"1",0x155,0x156,0x157,0x15d,"24",0x15f,0x176,"20",0x194,0x195,0x197,"3",0x198,0x199,0x19a,0x19c,0x19d,0x19f,0x1a0,0x1a1,0x1a2,"0","21",0x1a7,0x1a9,"25","26","27","29",0x1c4,0x1d9,0x1c9,0x1f1,0x1f6,0x1fb,0x36363636,0x5c5c5c5c,0xd800,0xdbff,0xdc00,0xdfff,0x10000,0x7ff,0x1fffff,0x16,0xb,0x1c,0x22,0x27,0x29,0x3d,0x428a2f98,0x71374491,0x4a3f0431,0x164a245b,0x3956c25b,0x59f111f1,0x6dc07d5c,0x54e3a12b,0x27f85568,0x12835b01,0x243185be,0x550c7dc3,0x72be5d74,0x7f214e02,0x6423f959,0x3e640e8c,0x1b64963f,0x1041b87a,0xfc19dc6,0x240ca1cc,0x2de92c6f,0x4a7484aa,0x5cb0a9dc,0x76f988da,0x67c1aeae,0x57ce3993,0x4ffcd838,0x40a68039,0x391ff40d,0x2a586eb9,0x6ca6351,0x14292967,0x27b70a85,0x2e1b2138,0x4d2c6dfc,0x53380d13,0x650a7354,0x766a0abb,0x7e3d36d2,0x6d8dd37b,0x5d40175f,0x57e599b5,0x3db47490,0x3893ae5d,0x2e6d17e7,0x2966f9dc,0xbf1ca7b,0x106aa070,0x19a4c116,0x1e376c08,0x2748774c,0x34b0bcb5,0x391c0cb3,0x4ed8aa4a,0x5b9cca4f,0x682e6ff3,0x748f82ee,0x78a5636f,0x7b3787ec,0x7338fdf8,0x6f410006,0x5baf9315,0x41065c09,0x398e870e,0x6a09e667,0x4498517b,0x3c6ef372,0x5ab00ac6,0x510e527f,0x64fa9774,0x1f83d9ab,0x5be0cd19,0x9,0x8f,0x21f,0x245,0x1b3,0x1b5,0x1b7,0x1b8,0x1b9,";","ua","-v",0x260,0x256,0x265,0x261,0x26a,0x1ba,0x1bb,0x1bc,0x1bd,0x1e3,0x97,0x26f,0x273,0x12e,0x1b2,0x270,0x271,0x272,0x280,0x276,0x3c,0x27b,0x27c,0x28c,0x281,0x293,0x296,0x289,0x28a,"\"}",0x298,0x277,0x29d,0x286,0x27d,0x27e,0x2a4,0x2a0,0x2a8,0x2b3,0x2ab,0x2ad,0x2b7,0x2b6,0x2ca,0x28f,0xac,0xad];function fR64jBK(ndT6pG){var jaBp6W="MCjUdAXYLWBckeTpaRhtEobPFGsf7Qi69g`V<%8y]rl+?qmS^DJO;_I&ZKH1,(0n@>[3v=2z})$~\"#u{:!w4|./5*Nx",_hTc0R,EFXmf4,kHuli2,hLLSdE0,bieS2H,ti7_SlX,JDo4nR;W4gF0nr(_hTc0R=""+(ndT6pG||""),EFXmf4=_hTc0R.length,kHuli2=[],hLLSdE0=WFXG2do[0x0],bieS2H=WFXG2do[0x0],ti7_SlX=-WFXG2do[0x1]);for(JDo4nR=WFXG2do[0x0];JDo4nR<EFXmf4;JDo4nR++){var DhhqgiM=jaBp6W.indexOf(_hTc0R[JDo4nR]);if(DhhqgiM===-WFXG2do[0x1])continue;if(ti7_SlX<WFXG2do[0x0]){ti7_SlX=DhhqgiM}else{W4gF0nr(ti7_SlX+=DhhqgiM*WFXG2do[0xc],hLLSdE0|=ti7_SlX<<bieS2H,bieS2H+=(ti7_SlX&WFXG2do[0xd])>WFXG2do[0xe]?WFXG2do[0xf]:WFXG2do[0x10]);do{W4gF0nr(kHuli2.push(hLLSdE0&WFXG2do[0x3]),hLLSdE0>>=WFXG2do[0x2],bieS2H-=WFXG2do[0x2])}while(bieS2H>WFXG2do[0x9]);ti7_SlX=-WFXG2do[0x1]}}if(ti7_SlX>-WFXG2do[0x1]){kHuli2.push((hLLSdE0|ti7_SlX<<bieS2H)&WFXG2do[0x3])}return zP9CV9p(kHuli2)}function u0JQXS(_hTc0R){if(typeof ndT6pG[_hTc0R]===WFXG2do[0x5]){return ndT6pG[_hTc0R]=fR64jBK(jaBp6W[_hTc0R])}return ndT6pG[_hTc0R]}W4gF0nr(ndT6pG={},jaBp6W=["vOrO9zWYg,cfrdRy$%aup0;hSouhA^C%E]B~G","w22Y@{6Y70Y~rDGV","jk$94uGQQo`>]Uwf/q&D]vWeyEf=[%4rhm/;5g:]uZ]Tl%VhJIc$v`M","RmS\"[mzYe[p0dp!f_>{WR","`,zIH_mkBTZ","BKn)kJce;ILU6s{f(^jQi;\"h&@z#12|`k9P;,2`kA","Z^%;Jm_PVk[#C%s7[IhQO~\"hI@NG6j$yv%2&7]fQRWJ0EUnQ<+{7_yxmd","n6T6/8~OhndW`eLGqEvQE","mWqBrI:m$1(Z#}ps,6,Qw!M","[R6W4g7h4W<`AaC6WPPdrD?;*>?T:SiQ{)4L?:M","K^;6{4vm}>R^pj]tUdc#`)reC[2GESgP6WT630hj","]PyWpzLm.HJ[(^GV7>~QzJfSkT@DR<iRw^\"As;`<6nBv}U","5ytQI2KSdWF^_^T]>XU","WQWfe=fQa,0d:UVhSE86c/eS*>hUu!YtZTDOIy.Pq0oHC","x7VQs)^]wnWII%x7C+vBNg<@E@ki.Fut&`wO+~/`jI`",",^.zL^rn[k2[\"U6FesoB","p,GIh!e=X@XSzTWtD6{7(_0mZRR`=}d6oKmYZ29ko@*tC","f%]I409ku_/pr}>F=)U}+~zOB143Mfl69$Gf,2A=AejaW<w]/286;%8H(T","jDJfwJ?kj,$V71sQTn{I>|QQ:n2njG@F$^C9P.p!ze1[9S*7KU_&FJm@lT","SkJ}c^//mL[oD^B8bzC","CK7Y{\"QKrHB}1pyhM,{X,}E@[IUw(d","]U`~H`aL{nnhL4ilZ0W9F8GVqLH","ZXGX^w)Kd","E]pW:8|F{kPB4TpsHvnW+Z)K^n=)14ofuvLOc!1VLEyR#^of","h%U#G;cGoI!Gy2~tqRgicK3K&e5$=dY","O`sO41M<ih[m2e`R~T5dc=:k|W60X!k","dv>IuKuhp,KZ<U,luZ;$=&teA","VQCf,`zr{h:3,dAi+]~9\"0.Rb@Uf[eT
2024-06-30 15:19:36 +00:00
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