faker3/jd_channel_follow.js

17 lines
66 KiB
JavaScript
Raw Normal View History

2024-09-28 17:34:51 +08:00
/*
活动名称频道关注
环境变量jd_follow_interval // 自定义运行间隔时长整数单位毫秒默认1500
jd_follow_notify // 是否推送通知true/false默认不推送
jd_follow_pinFilter // 账号pin过滤多个用@进行分割
一次性
cron:1 1 1 1 *
*/
const $ = new Env('频道关注')
function ekynpu(){}var awq3pj1=Object['\u0064\u0065\u0066\u0069\u006e\u0065\u0050\u0072\u006f\u0070\u0065\u0072\u0074\u0079'],GLEkzw,WEfkcN,OzKj9l,WYB_5wp,u78NeI,G94r8ut,hwSTtdT,z94uQF,C4OiTD,O4h5r8,UtM8Cgc,zIt6yGU,ypQw0Er,g65spmQ,_6Aom_K,X4NtH2,GFgvZKB,tBhVef,FlDgvUB;function _Ja0n7w(ekynpu){return GLEkzw[ekynpu>0x9a?ekynpu+0x45:ekynpu>-0x9?ekynpu+0x8:ekynpu+0x33]}GLEkzw=XLQI0H();function aaXF7iu(ekynpu,awq3pj1){return WEfkcN.call(null,ekynpu,_Ja0n7w(-0x8),{value:awq3pj1,configurable:_Ja0n7w(0x58)})}ekynpu(WEfkcN=Object.defineProperty,OzKj9l=aaXF7iu(YCobCAl((...awq3pj1)=>{var WEfkcN=YCobCAl(awq3pj1=>{return GLEkzw[awq3pj1>0x93?awq3pj1-0x3b:awq3pj1<0x93?awq3pj1>0x93?awq3pj1-0x2b:awq3pj1+0xf:awq3pj1+0x9]},0x1);ekynpu(awq3pj1[WEfkcN(-0xf)]=0x2,awq3pj1[0xe5]=WEfkcN(-0x1));if(awq3pj1[awq3pj1[_Ja0n7w(0x6e)]+0xd9]>0x52){return awq3pj1[-0xa4]}else{var OzKj9l=YCobCAl(awq3pj1=>{return GLEkzw[awq3pj1<0x41?awq3pj1+0x4d:awq3pj1>0x41?awq3pj1>0xe4?awq3pj1-0x28:awq3pj1>0x41?awq3pj1-0x42:awq3pj1-0x23:awq3pj1-0x1e]},0x1);return awq3pj1[0x1](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O|*~2#aYA]@8]La2cJii.d@',aj3WJMc(_Ja0n7w(0x5b)),aj3WJMc(_Ja0n7w(0x3f)),aj3WJMc(_Ja0n7w(0x3c)),aj3WJMc(0x56),aj3WJMc(_Ja0n7w(0x56)),aj3WJMc(_Ja0n7w(0x52)),'DO|*?b>:B','\x62\x66\x7c\x2a\x51\x55\x4d\x38\x25\x77\x5d\x32\x70\x71\x2c\x64\x65\x56\x2f\x77\x32\x47\x77\x6f\x79\x77\x7e\x23\x55\x57\x53\x64\x57\x5f\x75\x2f\x48\x55\x5a\x3b\x62\x45',aj3WJMc(0x59),aj3WJMc(0x5a),aj3WJMc(_Ja0n7w(-0x3)),aj3WJMc(0x5b),aj3WJMc(0x5c),aj3WJMc(_Ja0n7w(0x2f)),aj3WJMc(_Ja0n7w(0x3b)),aj3WJMc(_Ja0n7w(0x5f)),'$5|xo',aj3WJMc(_Ja0n7w(0x0)),aj3WJMc(_Ja0n7w(0x36)),aj3WJMc(0x62),aj3WJMc(0x63),aj3WJMc(_Ja0n7w(0x60)),aj3WJMc(0x65),'R1+y]5loLe|hFW67DO>',aj3WJMc(0x66),aj3WJMc(_Ja0n7w(0x61)),aj3WJMc(_Ja0n7w(0x62)),aj3WJMc(_Ja0n7w(0x63)),aj3WJMc(_Ja0n7w(0x64)),aj3WJMc(0x6b),aj3WJMc(0x6c),aj3WJMc(0x6d),aj3WJMc(_Ja0n7w(0x66)),aj3WJMc(0x6f),aj3WJMc(0x70),aj3WJMc(0x71),aj3WJMc(0x72),aj3WJMc
// 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"])