faker2/jd_drawShopGift.js

25 lines
68 KiB
JavaScript
Raw Normal View History

2024-06-28 07:27:40 +00:00
/*
活动名称店铺关注有礼
活动链接店铺首页关注按钮
环境变量jd_drawShopGift_argv // 活动参数,支持两种格式:”<shopId(店铺id)>_<venderId(商家id)>“ 或 ”<活动店铺首页链接>“
jd_drawShopGift_threads // 控制并发线程数正整数默认1最大5
jd_drawShopGift_interval // 自定义运行间隔时长整数单位毫秒默认1000
jd_drawShopGift_notify // 是否推送通知true/false默认不推送
2024-08-13 02:55:06 +00:00
如果有等级礼包也会领取需要入会的请自行入会
2024-06-28 07:27:40 +00:00
请勿滥用自动化工具解析的店铺链接作为变量使用本脚本请确认活动有效性后再使用
因自动化程序滥用严重导致官方接口受影响现在必须同时提供店铺和商家id才可运行
高并发脚本黑号领不到奖品
活动限制IP严重建议使用代理谨慎使用并发
2024-08-13 02:55:06 +00:00
cron:1 1 1 1 *
2024-06-28 07:27:40 +00:00
*/
const $ = new Env('店铺关注有礼')
2024-08-13 02:55:06 +00:00
function Ki9_del(){}var _s1OCH=Object['defineProperty'],NBEyt_l,X6QIJC,Ph88Tk,t1Gfto,Y3VqOd,efSqmF,U8N6jAq,wFqkoAs,XP32xOW,scPXW1,IoVH1a,lRiHd4q,B2pphw,YI1cUV,tzUNNi8,PNvLuK;function nyvFpHq(Ki9_del){return NBEyt_l[Ki9_del<0x3b?Ki9_del<0x3b?Ki9_del>0x3b?Ki9_del-0x3:Ki9_del+0x53:Ki9_del-0x21:Ki9_del+0x5a]}NBEyt_l=kMG5JMI.call(this);function xjb8_eI(Ki9_del,_s1OCH){return X6QIJC(Ki9_del,'length',{value:_s1OCH,configurable:nyvFpHq(-0x6)})}X6QIJC=Object.defineProperty;var sD3ayC9=[],pSjqfU=['9N4]V|jc','X|kR;>Fc','MJY>"@jc','n3T^"7nzt','d~`b(y@.@?}c$7','w%"A8','B6KDeZ++]5a','8Tc~==<h)?4bPl','PEqm!','rTbf$|nW','95t7Uu&W','MT.F','~S^uh',';OS*c','pb.T@W]F','lq&*','FN,#w','=sr)','7?l&<~{<"xY1_6vrlyWKs~F3h','7?l&<~?F','>2Y}/Ufv','OAPT}W]F','Bbf&xWd','7?l&<~{<"xY1_6vrlyWKjTYK)./{>N','a=5N?','7?l&<~{<"xY1_6vrly3%9@^%vzL','7?l&<~{<"xY1_6vrly3%w@^%vzL','6fG#w','Xb^@t','vN~*','s]S*#:$F','j2&*','=F0yu,fR(tpa6u:Wy1zR(Mv','J<k7u,^.`_&"v','yP+*B',']q02,H+F','2]5)K:d','AbV#X:rm[YD`v','2p`%F$aF','tL[)]',';OPTrId','2p`%Z{g+}Y=Iv',nyvFpHq(-0x4d),'lq2C9~$F','s]m#.}v%h','cqm#w','yG)x5IXq3Je,DTl2}nDQJig{#HfDHfrW>qA0aFseG:,,`Ygayb9QSImN;J>^5DK2cWbb','osV&%;KK].','ry5)^Wwv','8pn*jfAF','2mjgJN6(Xc','9b_*C@[%y^','NN`TC:,[/m@$wuR7Qy4%t','w$O#UWd','pb.T@W]F','8pn*jfAF','9b_*t:[%y^','9b_*t:$F','yG)x5IXq3J9"DTe%SF&ZGR63%GPDyHRWg?90s9cuxP#X|^n{`v','9b_*t:[%y^','8pn*jfAF','yG)x5IXq3J9"DTe%SF&ZGR63%GPDyHRWg?90s9cuxP#X|^n{`v','9b_*t:[%y^','8pn*jfAF','yG)x5IXq`J]pfT>2;<9?','X&_4WY8ixKrN9H!9aB^^IpJ','o{oTC;giNv~','9b_*t:$F','AbPT9IsFNyzISb,7','8pn*1$vmTY*0+6[','8pn*bDwGG^','LG}ldxD]{TH`khV~.+w.Tb~6wT#X~Y00e]vk}8}*fJH1*DRYHkfx','h$l#kThmfmPIE:Js','{]_*',nyvFpHq(-0x53),nyvFpHq(-0x51),'yG)x5IXjQsSrc5ZS>e0?Tp1%_]LkHfhWazNq0i~6S@/|4A9`^+e;q',']q.TCjvmWA','KLm#aTAF','AbPTX@K_oz=C]o]<)v','=yl&xH7F','1f7CTW.F','Ab5)w@;`7_2I]oc<+v','wqn*K:;~/','2p`%Z{sF','bbPMB','s]%)','Hkxru,nr_]K2%/^','AbV#fTv%7_8NrnJs=s5)','Abm#g=d','`=MN','~QtTq~d','/N_*C@3F','9S2o,','AbXD1Sqv','AbXD1S%v','AbPT9IsFPy;z_b;Q2]6#UWc%lm"1v',nyvFpHq(-0x53),',N+*B','AbV#fTv%7_8NrnJs=s5)','$*V#w6H+91Ofv','s]%)','nkdZLhm]{TH`khV~.+w.Tbv','.Vm7a+E{P@V',nyvFpHq(-0x52),'$*V#w6H+#5k~A"?','8pn*Xa/3q0y','BbC}c@vw/','Bb`%="z[L^','9qw2c','BqS*9@!F','BqS*9@=m#z,Pv','8pn*jfAF','s]%)','0iVl[Nh#UT=kdB:~yo<.{]v',nyvFpHq(-0x52),',N+*3jtF',',N+*B','Vfh}zkYg8_Mk$ox','AbV#fTQF','osZ}X@7F','Cb_*B',',N+*B','AbV#fTv%7_8NrnJs=s5)',']qKCw','D2}Bg>tKc0y','Bbj#w}aF',nyvFpHq(-0x4e),'s]%)','osV&%;KK].','M?/.j*fnyTt&./',nyvFpHq(-0x51),'s]%)','J<k7u,/rH}/%*/r~6N:Rr9v','D2}Bg>uF','f2[)','Wo%lm','HxLT+','CO@Hrgf8BY','<]d*[S*mi^','GQf#=P}`$j:o_bk<9?:tFnZmh','2p`%F$aF','ealEcy(mw','Bb`%="z[L^','9qw2c','|.m/30Z{0^=','*!:7yu+g','f=5N','hr1FCN=u','qG)!','rOqT','ux<|{l~ltm~{PfRA5so;MZsKi~F6]=(;sRrIf~LOT',nyvFpHq(-0x51),'[/)EO','%="NW9Mv','o=BN','Syf#jT;`vzL','c"SA46xlae|{]YTAdiLbya(','/2:!"3V(','0Gq!c,@',nyvFpHq(-0x4f),'9iIT','cW$;ZX3rH}/%*/RWrzw.Mvv',nyvFpHq(-0x50),'8adQ2][%w',nyvFpHq(-0x50),nyvFpHq(-0x4f),'9iIT','rOqT','c"SA46xlae|{]YTAdiLbyaFI*F8(LV',nyvFpHq(-0x4e),'hqBh5','ry5)^W"Jc%NP[nl7kt}%P>%GC%ZYWLH7LsM}TW_grm','8pn*jfAF',']q.TiPaF','RqKDJ>.F','h$l#dWYg>m','7][)+}8`lLmf)M[','ufBN$#Mv','o=5NW9d','RqKDJ>q[>_o','8pn*,V?F:_:!x"Llapc#K:d','`s&*','dN5)','9b_*t:[%y^','9b_*t:$F','AL.TTW_g7_Ofv','AbPT9IsF','Vp]#K:Zv','#yw2bHaF','j]_2C@d','BL4%rJK+?0w0ao[Z=/@C;>aF','AbPT/HOW/','8ru9t','ry5)^W"JF','KOl#k#bWF','7?2:K@ngF','TQ8CkTBWF','$*V##@7F','<]d*3jLF}^','!]~*','$*V#w6H+91Ofv','8pn*,V?F:_:!x"LlP0w2y8G<h','BL4%rJGv','6fw2VnTv','7qj%B:uF','Vfh}zk]F','5$:tFnaF','4fS*','+b5)#@AF','mbf&t:lmh','x*XCNUaF','LR_O','x*XCNUzGx?}o;oMr;.O','wH+*pCmpG^<Y]o"l$(H]x','x*XCNUzG3k50IL+QAbO','Tp(O7Pcmd%M.@[D5cQKwkTU^8kX>zFXulQ}{qId$*^PIPl{cqS3Mi#5v','JR02K:uF','2]I2c','Xb6&|C?F','$]6#w','JR_*#:4+(hk~A"?','h$~*[HIhq0Y1!6pRA0v@ECkg,0Wzjc?7=sp}y81+/','JRtT?H.F','lr%t>ad','lr%tX{d','exXC#o1+i^Uzpj`swv','Yr~*7Jd','exXC#o.F','0*YCw2sF',']q`Tt','0*YC=ktF','hN,#4Cz[az5kTN','l24%|CHsG^PIv','Wro#vnq[}^4zuugQ(O2Cw',']qy2(l^vwYH~o+tl3qxCX}.F','WrO)|CuF','$]4%~Wd','pR>.Ti774/_','==^pYE:0','6OV#+','Q[4p|z)V)','Txrh','JR_*#:7F','.`*h,It0','h#Rpp@}V)','|>vEk@`A)','6^a.RF<','k
2024-06-28 07:27:40 +00: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.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"])