update CAT
This commit is contained in:
Vendored
+2
-2
@@ -398,7 +398,7 @@ function print() { __p += __j.call(arguments, '') }
|
||||
`+i):l.stack=i}throw l}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=is(this.defaults,n);let{transitional:l,paramsSerializer:r,headers:i}=n;l!==void 0&&Sf.assertOptions(l,{silentJSONParsing:ua.transitional(ua.boolean),forcedJSONParsing:ua.transitional(ua.boolean),clarifyTimeoutError:ua.transitional(ua.boolean)},!1),r!=null&&(Z.isFunction(r)?n.paramsSerializer={serialize:r}:Sf.assertOptions(r,{encode:ua.function,serialize:ua.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=i&&Z.merge(i.common,i[n.method]);i&&Z.forEach(["delete","get","head","post","put","patch","common"],y=>{delete i[y]}),n.headers=s2.concat(s,i);let a=[],u=!0;this.interceptors.request.forEach(function(_){typeof _.runWhen=="function"&&_.runWhen(n)===!1||(u=u&&_.synchronous,a.unshift(_.fulfilled,_.rejected))});let o=[];this.interceptors.response.forEach(function(_){o.push(_.fulfilled,_.rejected)});let c,f=0,m;if(!u){let y=[wf.bind(this),void 0];for(y.unshift.apply(y,a),y.push.apply(y,o),m=y.length,c=Promise.resolve(n);f<m;)c=c.then(y[f++],y[f++]);return c}m=a.length;let d=n;for(f=0;f<m;){let y=a[f++],_=a[f++];try{d=y(d)}catch(S){_.call(this,S);break}}try{c=wf.call(this,d)}catch(y){return Promise.reject(y)}for(f=0,m=o.length;f<m;)c=c.then(o[f++],o[f++]);return c}getUri(e){e=is(this.defaults,e);let n=go(e.baseURL,e.url);return yo(n,e.params,e.paramsSerializer)}};Z.forEach(["delete","get","head","options"],function(e){j4.prototype[e]=function(n,l){return this.request(is(l||{},{method:e,url:n,data:(l||{}).data}))}});Z.forEach(["post","put","patch"],function(e){function n(l){return function(i,s,a){return this.request(is(a||{},{method:e,headers:l?{"Content-Type":"multipart/form-data"}:{},url:i,data:s}))}}j4.prototype[e]=n(),j4.prototype[e+"Form"]=n(!0)});var J6=j4;var Gw=class t{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});let l=this;this.promise.then(r=>{if(!l._listeners)return;let i=l._listeners.length;for(;i-- >0;)l._listeners[i](r);l._listeners=null}),this.promise.then=r=>{let i,s=new Promise(a=>{l.subscribe(a),i=a}).then(r);return s.cancel=function(){l.unsubscribe(i)},s},e(function(i,s,a){l.reason||(l.reason=new Dr(i,s,a),n(l.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;let n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}static source(){let e;return{token:new t(function(r){e=r}),cancel:e}}},hK=Gw;function Jw(t){return function(n){return t.apply(null,n)}}function Kw(t){return Z.isObject(t)&&t.isAxiosError===!0}var Xw={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Xw).forEach(([t,e])=>{Xw[e]=t});var mK=Xw;function yK(t){let e=new J6(t),n=P6(J6.prototype.request,e);return Z.extend(n,J6.prototype,e,{allOwnKeys:!0}),Z.extend(n,e,null,{allOwnKeys:!0}),n.create=function(r){return yK(is(t,r))},n}var Jl=yK(P4);Jl.Axios=J6;Jl.CanceledError=Dr;Jl.CancelToken=hK;Jl.isCancel=M6;Jl.VERSION=_o;Jl.toFormData=ia;Jl.AxiosError=qe;Jl.Cancel=Jl.CanceledError;Jl.all=function(e){return Promise.all(e)};Jl.spread=Jw;Jl.isAxiosError=Kw;Jl.mergeConfig=is;Jl.AxiosHeaders=s2;Jl.formToJSON=t=>yf(Z.isHTMLForm(t)?new FormData(t):t);Jl.getAdapter=bf.getAdapter;Jl.HttpStatusCode=mK;Jl.default=Jl;var U4=Jl;var{Axios:KUe,AxiosError:XUe,CanceledError:WUe,isCancel:YUe,CancelToken:QUe,VERSION:ZUe,all:eMe,Cancel:tMe,isAxiosError:nMe,spread:lMe,toFormData:gK,AxiosHeaders:rMe,HttpStatusCode:iMe,formToJSON:sMe,getAdapter:aMe,mergeConfig:uMe}=U4;var xK=Ql(require("https"),1),AK=Ql(require("crypto"),1),OK=Ql(SK(),1),Qw={};globalThis.dataBase=null;globalThis.local={get:async function(t,e){return await _xe(t,e)},set:async function(t,e,n){await Exe(t,e,n)}};async function _xe(t,e){let n="/js_"+t+`/${e}/`;return await dataBase.getObjectDefault(n,{})}async function Exe(t,e,n){let l="/js_"+t;Qw=await dataBase.getObjectDefault(l,{}),Qw[e]=n,t==="log"&&await req("http://127.0.0.1:8099/upload",{data:{log:n+`
|
||||
`},timeout:.1}),await dataBase.push(l,Qw)}globalThis.localLog={set:async function(t,e,n){wxe(t,e,n)}};function bxe(){bo.default.existsSync("log")||bo.default.mkdirSync("log");let t="log/info.log";return bo.default.existsSync(t)?bo.default.readFileSync(t).toString():(bo.default.writeFileSync(t,""),"")}function wxe(t){bo.default.writeFileSync("log/info.log",bxe()+`
|
||||
`+t)}globalThis.req=Sxe;async function Sxe(t,e){try{let n=e&&e.data||null,l=e&&e.postType||null,r=e&&e.buffer||0,i=e&&e.timeout||5e3,s=(e&&e.redirect||1)===1,a=e.proxy??!1,u=e?e.headers||{}:{};l==="form"?(u["Content-Type"]="application/x-www-form-urlencoded",n!=null&&(n=TK.default.stringify(n,{encode:!1}))):l==="form-data"&&(u["Content-Type"]="multipart/form-data",n=gK(n));let o=r===1||r===2?"arraybuffer":void 0,c;a?c=OK.default.httpsOverHttp({proxy:{host:"127.0.0.1",port:7890}}):c=xK.default.Agent({rejectUnauthorized:!1});let f=await U4(t,{responseType:o,method:e&&e.method||"get",headers:u,data:n,timeout:i,maxRedirects:s?null:0,httpsAgent:c});n=f.data;let m={};for(let d of f.headers){let y=d[1];m[d[0]]=Array.isArray(y)&&y.length===1?y[0]:y}if(!r)typeof n=="object"&&(n=JSON.stringify(n));else{if(r===1)return{code:f.status,headers:m,content:n};if(r===2)return{code:f.status,headers:m,content:n.toString("base64")};if(r===3){let d=e.stream;return d.onResp&&await d.onResp({code:f.status,headers:m}),d.onData?(n.on("data",async y=>{await d.onData(y)}),n.on("end",async()=>{d.onDone&&await d.onDone()})):d.onDone&&await d.onDone(),"stream..."}}return{code:f.status,headers:m,content:n}}catch(n){let l=n.response;try{return{code:l.status,headers:l.headers,content:JSON.stringify(l.data)}}catch{return{headers:{},content:""}}}}globalThis.md5X=Txe;function Txe(t){return AK.default.createHash("md5").update(Buffer.from(t,"utf8")).digest("hex")}globalThis.js2Proxy=function(t,e,n){let l=Object.keys(n).length===0?" ":encodeURIComponent(JSON.stringify(n));return t.server.address().dynamic+t.server.prefix+"/proxy/"+encodeURIComponent(e)+"/"+l+"/"};var xxe=["DEBUG","INFO","WARNING","ERROR"];var $4=class{constructor(e,n="DEBUG"){this.app_name=e,this.level=n,this.level_index=xxe.indexOf(n)}format(e,n){let l=80;switch(e){case"INFO":l=l+1;break;case"WARNING":l=l-2;break;default:break}return n.length<l&&((l-n.length)%2===0?n="#".repeat(Math.floor((l-n.length)/2))+n+"#".repeat(Math.floor((l-n.length)/2)):n="#".repeat(Math.floor((l-n.length)/2))+n+"#".repeat(Math.floor((l-n.length)/2)+1)),n}getTime(){let e=new Date;return e.toLocaleDateString().replace(/\//g,"-")+" "+e.toTimeString().substr(0,8)+","+e.getMilliseconds().toString()}formatMessage(e,n,l){return l&&(n=this.format(e,n)),`${this.getTime()} - ${this.app_name} - ${e}: ${n}`}async log(e){console.debug(e),await req("http://127.0.0.1:8099/upload",{data:{log:e+`
|
||||
`},timeout:.1})}async info(e,n){this.level_index<=1&&await this.log(this.formatMessage("INFO",e,n))}async warning(e,n){this.level_index<=2&&await this.log(this.formatMessage("WARNING",e,n))}async error(e,n){this.level_index<=3&&await this.log(this.formatMessage("ERROR",e,n))}async debug(e,n){this.level_index<=0&&await this.log(this.formatMessage("DEBUG",e,n))}};var Ce=class extends Pe{constructor(){super(),this.jadeLog=new $4(this.getAppName(),"DEBUG")}async init(e,n){await this.jadeLog.info("\u521D\u59CB\u5316",!0);try{await await req("http://127.0.0.1:8099/clear",{timeout:.1}),this.siteKey=this.getJSName(),this.siteType=this.getType(),this.cfgObj=e.server.config[this.siteKey],this.deviceKey=e.server.prefix+"/",this.db=e.server.db,this.catOpenStatus=!0,this.danmuStaus=!1;try{await this.loadFilterAndClasses()?await this.jadeLog.debug("\u8BFB\u53D6\u7F13\u5B58\u5217\u8868\u548C\u4E8C\u7EA7\u83DC\u5355\u6210\u529F"):(await this.jadeLog.warning("\u8BFB\u53D6\u7F13\u5B58\u5217\u8868\u548C\u4E8C\u7EA7\u83DC\u5355\u5931\u8D25"),await this.writeFilterAndClasses())}catch(l){await this.db.push(this.deviceKey+"classes",{}),await this.db.push(this.deviceKey+"filterObj",{}),await this.jadeLog.error("\u8BFB\u53D6\u7F13\u5B58\u5931\u8D25,\u5931\u8D25\u539F\u56E0\u4E3A:"+l,!1)}}catch(l){await this.jadeLog.error(`\u521D\u59CB\u5316\u5931\u8D25,\u5931\u8D25\u539F\u56E0\u4E3A:${l}`)}await this.jadeLog.info("\u521D\u59CB\u5316\u5B8C\u6210",!0)}async loadFilterAndClasses(){return this.classes=await this.getClassesCache(),this.filterObj=await this.getFiletObjCache(),this.classes.length>0?!0:(await this.db.push(this.deviceKey+"classes",{}),await this.db.push(this.deviceKey+"filterObj",{}),!1)}async writeFilterAndClasses(){this.catOpenStatus&&this.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await this.setClasses(),await this.setFilterObj(),await this.db.push(this.deviceKey+"classes",this.classes),await this.db.push(this.deviceKey+"filterObj",this.filterObj)}async getClassesCache(){let e=await this.db.getObjectDefault(this.deviceKey+"classes",{});return B.isEmpty(e)?this.classes:e}async getFiletObjCache(){let e=await this.db.getObjectDefault(this.deviceKey+"filterObj",{});return B.isEmpty(e)?this.filterObj:e}async home(e,n){return this.vodList=[],await this.jadeLog.info("\u6B63\u5728\u89E3\u6790\u9996\u9875\u7C7B\u522B",!0),await this.setHome(),await this.jadeLog.debug(`\u9996\u9875\u7C7B\u522B\u5185\u5BB9\u4E3A:${this.result.home(this.classes,[],this.filterObj)}`),await this.jadeLog.info("\u9996\u9875\u7C7B\u522B\u89E3\u6790\u5B8C\u6210",!0),this.result.home(this.classes,[],this.filterObj)}async homeVod(){await this.jadeLog.info("\u6B63\u5728\u89E3\u6790\u9996\u9875\u5185\u5BB9",!0);try{return await this.setHomeVod(),await this.jadeLog.debug(`\u9996\u9875\u5185\u5BB9\u4E3A:${this.result.homeVod(this.homeVodList)}`),await this.jadeLog.info("\u9996\u9875\u5185\u5BB9\u89E3\u6790\u5B8C\u6210",!0),this.result.homeVod(this.homeVodList)}catch(e){await this.jadeLog.error(`\u9996\u9875\u5185\u5BB9\u89E3\u6790\u5931\u8D25,\u5931\u8D25\u539F\u56E0\u4E3A:${e}`)}}async category(e,n){let l=e.body.id,r=e.body.page,i=!0,s=e.body.filters;if(this.page=parseInt(r),await this.jadeLog.info(`\u6B63\u5728\u89E3\u6790\u5206\u7C7B\u9875\u9762,tid = ${l},pg = ${r},extend = ${JSON.stringify(s)}`),l==="\u6700\u8FD1\u66F4\u65B0")return this.page=0,await this.homeVod();try{return this.vodList=[],await this.setCategory(l,r,i,s),await this.jadeLog.debug(`\u5206\u7C7B\u9875\u9762\u5185\u5BB9\u4E3A:${this.result.category(this.vodList,this.page,this.count,this.limit,this.total)}`),await this.jadeLog.info("\u5206\u7C7B\u9875\u9762\u89E3\u6790\u5B8C\u6210",!0),this.result.category(this.vodList,this.page,this.count,this.limit,this.total)}catch(a){await this.jadeLog.error(`\u5206\u7C7B\u9875\u89E3\u6790\u5931\u8D25,\u5931\u8D25\u539F\u56E0\u4E3A:${a}`)}}async detail(e,n){await this.jadeLog.debug(`\u83B7\u53D6\u8BE6\u60C5\u9875\u9762:${JSON.stringify(e.body)}`);let r=(Array.isArray(e.body.id)?e.body.id:[e.body.id])[0];this.vodDetail=new Me,await this.jadeLog.info(`\u6B63\u5728\u83B7\u53D6\u8BE6\u60C5\u9875\u9762,id\u4E3A:${r}`);try{return await this.setDetail(r),await this.jadeLog.debug(`\u8BE6\u60C5\u9875\u9762\u5185\u5BB9\u4E3A:${this.result.detail(this.vodDetail)}`),await this.jadeLog.info("\u8BE6\u60C5\u9875\u9762\u89E3\u6790\u5B8C\u6210",!0),this.vodDetail.vod_id=r,this.result.detail(this.vodDetail)}catch(i){await this.jadeLog.error("\u8BE6\u60C5\u754C\u9762\u83B7\u53D6\u5931\u8D25,\u5931\u8D25\u539F\u56E0\u4E3A:"+i)}}async play(e,n){let l=e.body.flag,r=e.body.id,i=[];await this.jadeLog.info(`\u6B63\u5728\u89E3\u6790\u64AD\u653E\u9875\u9762,flag:${l},id:${r},flags:${i}`,!0);try{let s;if(await this.setPlay(l,r,i),this.playUrl.content!==void 0)return this.playUrl;if(await this.jadeLog.debug("\u4E0D\u9700\u8981\u52A0\u8F7D\u5F39\u5E55",!0),this.result.jx===1&&this.playUrl.indexOf(".m3u8")<0){let a=await e.server.messageToDart({action:"sniff",opt:{url:r,timeout:6e4,rule:"http((?!http).){12,}?\\.m3u8?"}});if(a&&a.url){let u={};a.headers&&(a.headers["user-agent"]&&(u["User-Agent"]=a.headers["user-agent"]),a.headers.referer&&(u.Referer=a.headers.referer)),await this.jadeLog.debug(`\u55C5\u63A2\u6210\u529F,\u64AD\u653E\u8FDE\u63A5\u4E3A:${a.url}`),s=JSON.stringify({parse:0,url:a.url,header:a.headers,jx:"0"})}else await this.jadeLog.error("\u89E3\u6790\u5931\u8D25,\u65E0\u6CD5\u55C5\u63A2\u5230\u64AD\u653E\u8FDE\u63A5"),s=JSON.stringify({parse:0,url:"",jx:"0"})}else s=this.result.play(this.playUrl);return await this.jadeLog.info("\u64AD\u653E\u9875\u9762\u89E3\u6790\u5B8C\u6210",!0),await this.jadeLog.debug(`\u64AD\u653E\u9875\u9762\u5185\u5BB9\u4E3A:${s}`),s}catch(s){await this.jadeLog.error("\u89E3\u6790\u64AD\u653E\u9875\u9762\u51FA\u9519,\u5931\u8D25\u539F\u56E0\u4E3A:"+s)}}async search(e,n){let l=e.body.page,r=e.body.wd,i=!0;return this.vodList=[],await this.jadeLog.info(`\u6B63\u5728\u89E3\u6790\u641C\u7D22\u9875\u9762,\u5173\u952E\u8BCD\u4E3A = ${r},quick = ${i},pg = ${l}`),await this.setSearch(r,i,l),this.vodList.length===0&&r.indexOf(" ")>-1&&(await this.jadeLog.debug(`\u641C\u7D22\u5173\u952E\u8BCD\u4E3A:${r},\u5176\u4E2D\u6709\u7A7A\u683C,\u53BB\u9664\u7A7A\u683C\u5728\u641C\u7D22\u4E00\u6B21`),await this.search(r.replaceAll(" ","").replaceAll("?",""),i)),await this.jadeLog.debug(`\u641C\u7D22\u9875\u9762\u5185\u5BB9\u4E3A:${this.result.search(this.vodList)}`),await this.jadeLog.info("\u641C\u7D22\u9875\u9762\u89E3\u6790\u5B8C\u6210",!0),this.result.search(this.vodList)}async proxy(e,n){try{let l=e.params.what,r={};try{r=JSON.parse(e.params.ids)}catch{}let i=decodeURIComponent(e.params.end),s=JSON.parse(await this.setProxy([l,i],r));return l==="dash"?(await this.jadeLog.debug(`dash:${JSON.stringify(s)}`),n.code(s.code).headers(s.headers),s.content):s.code===200?(n.code(s.code).headers(s.headers),Buffer.from(s.content,"base64")):(n.code(500),"")}catch(l){await this.jadeLog.error(`\u4EE3\u7406\u56DE\u8C03\u5931\u8D25,\u5931\u8D25\u539F\u56E0\u4E3A:${l}`)}}};var ca=class extends Pe{constructor(){super(),this.siteUrl="http://cj.ffzyapi.com",this.remove18=!1,this.type_id_18=34}async spiderInit(e){e!==null?this.detailProxy=await js2Proxy(e,"detail",this.getHeader()):this.detailProxy=await js2Proxy(!0,this.siteType,this.siteKey,"detail/",this.getHeader())}async init(e){await super.init(e),await this.spiderInit(null)}async parseVodShortListFromJson(e,n=!1){let l=[],r;for(let i of e.list)n?(r=new Ne,r.vod_pic=this.detailProxy+n2(i.vod_id),r.vod_id=i.vod_id,r.vod_name=i.vod_name,r.vod_remarks=i.vod_remarks):r=this.parseVodDetail(i),this.remove18&&i.type_id!==this.type_id_18&&l.push(r),!this.remove18&&i.type_id===this.type_id_18&&l.push(r);return l}parseVodDetail(e){let n=new Me;n.vod_id=e.vod_id,n.vod_name=e.vod_name,n.vod_pic=e.vod_pic,n.vod_remarks=e.vod_remarks,n.vod_area=e.vod_area,n.vod_year=e.vod_year,n.vod_actor=e.vod_actor,n.vod_director=e.vod_director;let l=Ue(e.vod_content);return n.vod_content=l.text(),e.vod_down_url!==void 0&&e.vod_down_url.length>0&&(n.vod_play_from="\u76F4\u94FE\u64AD\u653E$$$",n.vod_play_url=e.vod_down_url+"$$$"),n.vod_play_from=n.vod_play_from+e.vod_play_from,n.vod_play_url=n.vod_play_url+e.vod_play_url,n.type_name=e.type_name,n}async parseVodDetailfromJson(e){let n,l=e.list;if(l.length>0){let r=l[0];n=this.parseVodDetail(r)}return n}async setClasses(){let e=await this.fetch(this.siteUrl+"/api.php/provide/vod/from",{ac:"list"},this.getHeader()),n=JSON.parse(e);for(let l of n.class)l.type_pid!==0&&this.classes.push(this.getTypeDic(l.type_name,l.type_id))}async setFilterObj(){let e=await this.fetch(this.siteUrl+"/api.php/provide/vod/from",{ac:"list"},this.getHeader()),n=JSON.parse(e);for(let l of this.classes){let r=l.type_id.toString();if(r!=="\u6700\u8FD1\u66F4\u65B0"){let i={key:"1",name:"\u5206\u7C7B",value:[{n:"\u5168\u90E8",v:r}]};for(let s of n.class){let a=s.type_name;a===this.type_name_18&&(this.type_id_18=s.type_id.toString()),this.remove18?s.type_pid===l.type_id&&a!==this.type_name_18&&i.value.push({n:a,v:s.type_id.toString()}):s.type_pid===l.type_id&&a===this.type_name_18&&i.value.push({n:a,v:s.type_id.toString()})}this.remove18?this.filterObj[r]=[i]:this.classes=[this.getTypeDic("\u6700\u8FD1\u66F4\u65B0","\u6700\u8FD1\u66F4\u65B0"),this.getTypeDic(this.type_name_18,this.type_id_18)]}}}async setHomeVod(){let e=await this.fetch(this.siteUrl+"/index.php/ajax/data",{mid:"1"},this.getHeader());this.homeVodList=await this.parseVodShortListFromJson(JSON.parse(e))}async setDetail(e){let n=await this.fetch(this.siteUrl+"/api.php/provide/vod",{ac:"detail",ids:e},this.getHeader());this.vodDetail=await this.parseVodDetailfromJson(JSON.parse(n))}async setCategory(e,n,l,r){e=r[1]??e;let i=this.siteUrl+`/index.php/ajax/data?mid=1&tid=${e}&page=${n}&limit=20`;await this.jadeLog.debug(`\u5206\u7C7BURL:${i}`);let s=await this.fetch(i,null,this.getHeader());await this.jadeLog.debug(`\u5206\u7C7B\u5185\u5BB9\u4E3A:${s}`),this.vodList=await this.parseVodShortListFromJson(JSON.parse(s))}async setSearch(e,n){let l=await this.fetch(this.siteUrl+"/api.php/provide/vod/",{wd:e},this.getHeader());this.vodList=await this.parseVodShortListFromJson(JSON.parse(l),!0)}async proxy(e,n){await this.jadeLog.debug(`\u6B63\u5728\u8BBE\u7F6E\u53CD\u5411\u4EE3\u7406 segments = ${e.join(",")},headers = ${JSON.stringify(n)}`);let l=e[0],r=_2(e[1]);if(await this.jadeLog.debug(`\u53CD\u5411\u4EE3\u7406\u53C2\u6570\u4E3A:${r}`),l==="detail"){let i=await this.fetch(this.siteUrl+"/api.php/provide/vod",{ac:"detail",ids:r},this.getHeader()),s=await this.parseVodDetailfromJson(JSON.parse(i)),a=await this.fetch(s.vod_pic,null,this.getHeader(),!1,!1,2);return B.isEmpty(a)?JSON.stringify({code:500,buffer:2,content:"",headers:{}}):JSON.stringify({code:200,buffer:2,content:a,headers:{}})}}};var Zw=class extends ca{constructor(){super(),this.siteUrl="https://haiwaikan.com",this.remove18=!0,this.type_id_18=0}async spiderInit(e){await super.spiderInit(e)}async init(e){await super.init(e),await this.spiderInit(null)}getAppName(){return"\u6D77\u5916\u770B"}getName(){return"\u2615\u2503\u6D77\u5916\u770B\u2503\u2615\u5899"}getJSName(){return"haiwaikan"}getType(){return 3}async setClasses(){let e=await this.fetch(this.siteUrl+"/api.php/provide/vod/from",{ac:"list"},this.getHeader()),n=JSON.parse(e);for(let l of n.class)l.type_id<26&&this.classes.push(this.getTypeDic(l.type_name,l.type_id.toString()));this.content_json=n}async getFilter(e,n){let l=[],r={key:"1",name:"\u5168\u90E8\u7C7B\u522B",value:[{n:"\u5168\u90E8\u7C7B\u522B",v:e.toString()}]};for(let i of n.class){let s=i.type_id,a=0,u=0;e===20&&(a=50,u=27),e===21&&(a=128,u=100),e===22&&(a=143,u=134),e===23&&(a=135,u=127),s<a&&s>u&&r.value.push({n:i.type_name,v:s.toString()})}return r.value.length>1?(l.push(r),l):null}async setFilterObj(){let e=await this.fetch(this.siteUrl+"/api.php/provide/vod/from",{ac:"list"},this.getHeader()),n=JSON.parse(e);for(let l of this.classes){let r=l.type_id;if(r!=="\u6700\u8FD1\u66F4\u65B0"){let i=await this.getFilter(parseInt(r),n);i!==null&&(this.filterObj[r]=i)}}}},yn=new Zw;var eS=class extends Ce{constructor(){super()}getName(){return yn.getName()}getAppName(){return yn.getAppName()}getJSName(){return yn.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await yn.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await yn.initCookie(e.server.config.bilicookie),await yn.spiderInit(e),yn.cfgObj.code=0,yn.catOpenStatus=!0,yn.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await yn.setClasses(),this.classes=yn.classes}async setFilterObj(){await yn.setFilterObj(),this.filterObj=yn.filterObj}async setHomeVod(){await yn.setHomeVod(),this.homeVodList=yn.homeVodList}async setCategory(e,n,l,r){await yn.setCategory(e,n,l,r),this.vodList=yn.vodList}async setDetail(e){await yn.setDetail(e),this.vodDetail=yn.vodDetail}async setPlay(e,n,l){await yn.setPlay(e,n,l),this.playUrl=yn.playUrl,this.result=yn.result}async setSearch(e,n,l){await yn.setSearch(e,n,l),this.vodList=yn.vodList,this.result=yn.result}async setProxy(e,n){return await yn.proxy(e,n)}},pa=new eS;async function NK(t,e){return await pa.init(t,e)}async function CK(t,e){return await pa.home(t,e)}async function Axe(t,e){return await pa.homeVod(t,e)}async function RK(t,e){return await pa.category(t,e)}async function IK(t,e){return await pa.detail(t,e)}async function kK(t,e){return await pa.play(t,e)}async function DK(t,e){return await pa.search(t,e)}async function Oxe(t,e){return await pa.proxy(t,e)}var PK={meta:{key:yn.getJSName(),name:yn.getName(),type:yn.getType()},api:async t=>{t.post("/init",NK),t.post("/home",CK),t.post("/category",RK),t.post("/detail",IK),t.post("/play",kK),t.post("/search",DK),t.get("/proxy/:what/:ids/:end",Oxe)},spider:{init:NK,home:CK,homeVod:Axe,category:RK,detail:IK,play:kK,search:DK}};function Tf(t,e){let n=xf();return Tf=function(l,r){return l=l-424,n[l]},Tf(t,e)}function xf(){let t=["1580630GngmmA","117uvwflw","join","current_id","565448Apkhig","23092JwmytW","707152yowhOv","getElementById","855936CGaczt","length","2966831GCGpvn","611266nfcTEf","value","substring"];return xf=function(){return t},xf()}(function(t,e){let n=Tf,l=t();for(;;)try{if(-parseInt(n(436))/1+parseInt(n(429))/2+-parseInt(n(433))/3*(-parseInt(n(437))/4)+-parseInt(n(432))/5+parseInt(n(426))/6+parseInt(n(428))/7+parseInt(n(424))/8===e)break;l.push(l.shift())}catch{l.push(l.shift())}})(xf,304089);function Nxe(t,e){let n=Tf,l=t,r=e;if(!l||!r)return;let i=l.length,s=l[n(431)](i-4,i),a=[];for(let u=0;u<s[n(427)];u++){let o=parseInt(s[u]),c=o%3+1;a[u]=r[n(431)](c,c+8),r=r[n(431)](c+8,r[n(427)])}return a[n(434)]("")}var tS=class extends Pe{constructor(){super(),this.siteUrl="https://v.ikanbot.com"}getName(){return"\u{1F916}\u2503\u7231\u770B\u673A\u5668\u4EBA\u2503\u{1F916}"}getAppName(){return"\u7231\u770B\u673A\u5668\u4EBA"}getJSName(){return"ikanbot"}getType(){return 3}async spiderInit(e=null){e!==null?this.jsBase=await js2Proxy(e,"img",this.getHeader()):this.jsBase=await js2Proxy(!0,this.siteType,this.siteKey,"img/",this.getHeader())}async init(e){await super.init(e),await this.spiderInit(null)}async parseVodShortListFromDoc(e){let n=[],l=e(e('[class="row list-wp"]')).find("a");for(let r of l){let i=new Ne,s=e(r).find("img")[0];i.vod_id=r.attribs.href,i.vod_pic=this.jsBase+n2(s.attribs["data-src"]),i.vod_name=s.attribs.alt,n.push(i)}return n}getChildren(e,n){try{return e[n].children[0].data}catch{return""}}async parseVodDetailFromDoc(e){let n=e("div.detail > .meta"),l=new Me;l.vod_pic=this.jsBase+n2(e("div.item-root > img")[0].attribs["data-src"]),l.vod_name=this.getChildren(n,0),l.vod_year=this.getChildren(n,1),l.vod_area=this.getChildren(n,3),l.vod_actor=this.getChildren(n,4);let r=we(/<input type="hidden" id="current_id" value="(.*?)"/,e.html()),i=we(/<input type="hidden" id="e_token" value="(.*?)"/,e.html()),s=we(/<input type="hidden" id="mtype" value="(.*?)"/,e.html()),a={videoId:r,mtype:s,token:Nxe(r,i)},u=await this.fetch(this.siteUrl+"/api/getResN",a,this.getHeader()),o=JSON.parse(u).data.list,c={},f=0,m=[];for(let d of o){let y=JSON.parse(d.resData);for(let _ of y){f=f+1;let S=_.flag,w=_.url;!S||!w||c[S]||(m.push(`\u7EBF\u8DEF${f}`),c[S]=w)}}return l.vod_play_from=m.join("$$$"),l.vod_play_url=B.values(c).join("$$$"),l}async parseVodShortListFromDocBySearch(e){let n=[],l=e("div.media > div.media-left > a");for(let r of l){let i=new Ne,s=e(r).find("img:first")[0];i.vod_id=r.attribs.href,i.vod_name=s.attribs.alt,i.vod_pic=this.jsBase+n2(s.attribs["data-src"]),n.push(i)}return n}async setClasses(){let e=await this.fetch(this.siteUrl+"/category",null,this.getHeader());if(!B.isEmpty(e)){let n=Ue(e),l=n(n(n('[class="row visible-xs-block visible-sm-block"]')).find("li")).find("a");for(let r of l)this.classes.push({type_name:n(r).text(),type_id:r.attribs.href})}}async setFilterObj(){for(let e of this.classes.slice(1,9)){let n=e.type_id;if(n.indexOf("category")===-1||n.indexOf(",")>-1){let l=n.split(",").slice(-1)[0],r=await this.fetch(this.siteUrl+l,null,this.getHeader());if(!B.isEmpty(r)){let i=Ue(r),s=i('[class="row visible-xs-block visible-sm-block"]'),a=s.find('[class="nav nav-pills"]').find("a"),u=[];n.indexOf(",")>-1&&u.push({n:"\u5168\u90E8",v:n.split(",")[0]});let o={key:n,name:i(s.find("h5")).text(),value:u};for(let c of a)u.push({n:i(c).text(),v:c.attribs.href});u.length>0&&(this.filterObj[n]=[o])}}}}async setHomeVod(){let e=await this.fetch(this.siteUrl,null,this.getHeader());if(!B.isEmpty(e)){let n=Ue(e);this.homeVodList=await this.parseVodShortListFromDoc(n)}}async setCategory(e,n,l,r){let i=this.siteUrl+(r[e]||e.split(",")[0]),s=!1;i.indexOf("html")>-1?i=i.replace(".html",n>1?`-p-${n}.html`:".html"):(i=i+`?p=${n}`,s=!0),await this.jadeLog.debug(`\u5206\u7C7BURL:${i}`);let a=await this.fetch(i,null,this.getHeader());if(!B.isEmpty(a)){let u=Ue(a);this.vodList=await this.parseVodShortListFromDoc(u);let o=u("div.page-more > a:contains(\u4E0B\u4E00\u9875)");s&&(this.page=parseInt(o[0].attribs.href.split("p=")[1]));let c=o.length>0;this.limit=24,this.count=c?parseInt(n)+1:parseInt(n),this.total=this.limit*this.count}}async setDetail(e){let n=await this.fetch(this.siteUrl+e,null,this.getHeader());if(!B.isEmpty(n)){let l=Ue(n);this.vodDetail=await this.parseVodDetailFromDoc(l)}}async setSearch(e,n){let l=await this.fetch(this.siteUrl+"/search?q="+e,null,this.getHeader());if(!B.isEmpty(l)){let r=Ue(l);this.vodList=await this.parseVodShortListFromDocBySearch(r)}}async setPlay(e,n,l){this.playUrl=n}},gn=new tS;var nS=class extends Ce{constructor(){super()}getName(){return gn.getName()}getAppName(){return gn.getAppName()}getJSName(){return gn.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await gn.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await gn.initCookie(e.server.config.bilicookie),await gn.spiderInit(e),gn.cfgObj.code=0,gn.catOpenStatus=!0,gn.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await gn.setClasses(),this.classes=gn.classes}async setFilterObj(){await gn.setFilterObj(),this.filterObj=gn.filterObj}async setHomeVod(){await gn.setHomeVod(),this.homeVodList=gn.homeVodList}async setCategory(e,n,l,r){await gn.setCategory(e,n,l,r),this.vodList=gn.vodList}async setDetail(e){await gn.setDetail(e),this.vodDetail=gn.vodDetail}async setPlay(e,n,l){await gn.setPlay(e,n,l),this.playUrl=gn.playUrl,this.result=gn.result}async setSearch(e,n,l){await gn.setSearch(e,n,l),this.vodList=gn.vodList,this.result=gn.result}async setProxy(e,n){return await gn.proxy(e,n)}},fa=new nS;async function LK(t,e){return await fa.init(t,e)}async function FK(t,e){return await fa.home(t,e)}async function Cxe(t,e){return await fa.homeVod(t,e)}async function jK(t,e){return await fa.category(t,e)}async function UK(t,e){return await fa.detail(t,e)}async function MK(t,e){return await fa.play(t,e)}async function $K(t,e){return await fa.search(t,e)}async function Rxe(t,e){return await fa.proxy(t,e)}var BK={meta:{key:gn.getJSName(),name:gn.getName(),type:gn.getType()},api:async t=>{t.post("/init",LK),t.post("/home",FK),t.post("/category",jK),t.post("/detail",UK),t.post("/play",MK),t.post("/search",$K),t.get("/proxy/:what/:ids/:end",Rxe)},spider:{init:LK,home:FK,homeVod:Cxe,category:jK,detail:UK,play:MK,search:$K}};var lS=class extends Pe{constructor(){super(),this.siteUrl="https://ali.gitcafe.ink"}getName(){return"\u{1F98A}\u2503\u963F\u91CC\u7EB8\u6761\u2503\u{1F98A}"}getAppName(){return"\u963F\u91CC\u7EB8\u6761"}getJSName(){return"gitcafe"}getType(){return 3}async getApiUrl(){let e=await this.fetch(this.siteUrl,null,this.getHeader());if(!B.isEmpty(e)){let n=we(/<script src='(.*?)'><\/script>/,e),l=await this.fetch(n,null,this.getHeader());return{api:"https:"+we(/ return '(.*?)' \+ /,l)+new Date().getTime(),search_api:we(/const SEARCH_API = '(.*?)';/,l)}}}async getContentJson(){let e=await this.getApiUrl(),n=await this.fetch(e.api,null,this.getHeader());if(this.search_api=e.search_api,!B.isEmpty(n))return JSON.parse(n)}async spiderInit(){this.content_json=await this.getContentJson(),this.token_dic=await this.load_cache()}async init(e){await this.spiderInit(),await super.init(e),await z2(this.cfgObj.token)}async parseClassFromJson(e){let n=Object.keys(e.data).slice(0,19);for(let l of n)this.classes.push({type_name:e.data[l].name,type_id:l})}async parseVodShortListFromJson(e){let n=[],l=this.getClassIdList();for(let r of e){let i=new Ne;l.includes(r.cat)&&(i.vod_id=JSON.stringify(r),i.vod_name=r.title,i.vod_remarks=r.date,n.push(i))}return n}async parseVodDetailfromJson(e){let n=this.getClassNameList(),l=this.getClassIdList(),r=new Me;r.vod_name=e.title,r.vod_remarks=e.creatime??e.date,r.type_name=n[l.indexOf(e.cat)],r.vod_content=e.des;let i="https://www.aliyundrive.com/s/"+e.alikey,s=await x3([i]);return r.vod_play_url=s.vod_play_url,r.vod_play_from=s.vod_play_from,r}async setClasses(){await this.parseClassFromJson(this.content_json)}async setHomeVod(){this.homeVodList=await this.parseVodShortListFromJson(this.content_json.info.new)}async setDetail(e){let n=JSON.parse(e);this.vodDetail=await this.parseVodDetailfromJson(n)}async setCategory(e,n,l,r){this.vodList=await this.parseVodShortListFromJson(this.content_json.data[e].catdata)}async setSearch(e,n){await this.refreshToken();let l={action:"search",from:"web",token:this.token_dic.token,keyword:e},r=await this.post(this.search_api,l,this.getHeader());if(!B.isEmpty(r)){let i=JSON.parse(r);this.vodList=await this.parseVodShortListFromJson(i.data)}}async refreshToken(){let e=new Date().getTime();B.isEmpty(this.token_dic.token)?(await this.get_token(),await this.jadeLog.debug("Token\u4E3A\u7A7A,\u5237\u65B0Token")):e-parseInt(this.token_dic.date)>24*60*60*1e3?(await this.jadeLog.debug(`Token\u5230\u671F,\u4E0A\u6B21\u83B7\u53D6Token\u65F6\u95F4\u4E3A:${e},\u5F53\u524D\u65F6\u95F4\u4E3A:${parseInt(this.token_dic.date)},\u5237\u65B0Token`),await this.get_token()):await this.jadeLog.debug("Token\u4ECD\u7136\u6709\u6548,\u65E0\u9700\u5237\u65B0",!0)}async get_token(){try{let e={action:"get_token",from:"web"},n=await this.post(this.search_api,e,this.getHeader());if(!B.isEmpty(n)){let l=JSON.parse(n),r=new Date().getTime();this.token_dic.token=l.data,this.token_dic.date=r.toString(),await this.write_cache()}}catch(e){await this.jadeLog.error("\u83B7\u53D6Token\u5931\u8D25,\u5931\u8D25\u539F\u56E0\u4E3A:"+e)}}async write_cache(){await local.set("gitcafe_token","token",JSON.stringify(this.token_dic))}async load_cache(){try{let e=await local.get("gitcafe_token","token");return JSON.parse(e)}catch{return{token:"",date:""}}}async play(e,n,l){return await A3(e,n,l)}},vn=new lS;var rS=class extends Ce{constructor(){super()}getName(){return vn.getName()}getAppName(){return vn.getAppName()}getJSName(){return vn.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await vn.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await vn.initCookie(e.server.config.bilicookie),await vn.spiderInit(e),vn.cfgObj.code=0,vn.catOpenStatus=!0,vn.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await vn.setClasses(),this.classes=vn.classes}async setFilterObj(){await vn.setFilterObj(),this.filterObj=vn.filterObj}async setHomeVod(){await vn.setHomeVod(),this.homeVodList=vn.homeVodList}async setCategory(e,n,l,r){await vn.setCategory(e,n,l,r),this.vodList=vn.vodList}async setDetail(e){await vn.setDetail(e),this.vodDetail=vn.vodDetail}async setPlay(e,n,l){await vn.setPlay(e,n,l),this.playUrl=vn.playUrl,this.result=vn.result}async setSearch(e,n,l){await vn.setSearch(e,n,l),this.vodList=vn.vodList,this.result=vn.result}async setProxy(e,n){return await vn.proxy(e,n)}},da=new rS;async function HK(t,e){return await da.init(t,e)}async function VK(t,e){return await da.home(t,e)}async function Ixe(t,e){return await da.homeVod(t,e)}async function qK(t,e){return await da.category(t,e)}async function zK(t,e){return await da.detail(t,e)}async function GK(t,e){return await da.play(t,e)}async function JK(t,e){return await da.search(t,e)}async function kxe(t,e){return await da.proxy(t,e)}var KK={meta:{key:vn.getJSName(),name:vn.getName(),type:vn.getType()},api:async t=>{t.post("/init",HK),t.post("/home",VK),t.post("/category",qK),t.post("/detail",zK),t.post("/play",GK),t.post("/search",JK),t.get("/proxy/:what/:ids/:end",kxe)},spider:{init:HK,home:VK,homeVod:Ixe,category:qK,detail:zK,play:GK,search:JK}};var K6=class extends Pe{constructor(){super(),this.siteUrl="http://op.ysdqjs.cn",this.cookie="",this.extendObj={extend:"\u7C7B\u578B",area:"\u5730\u533A",year:"\u5E74\u4EE3"},this.parseMap={}}async request(e,n,l){let r={"User-Agent":Gl};B.isEmpty(this.cookie)||(r.Cookie=this.cookie);let i=n==="post"?"form-data":"",s=await req(e,{method:n||"get",headers:r,data:l,postType:i});if(s.code===403){let a=s.data.match(/window\.location\.href ="(.*?)"/)[1];this.cookie=B.isArray(s.headers["set-cookie"])?s.headers["set-cookie"].join(";"):s.headers["set-cookie"],r.Cookie=this.cookie,s=await req(this.siteUrl+a,{method:n||"get",headers:r,data:l,postType:i})}return s.content}async postData(e,n){let l=Math.floor(new Date().getTime()/1e3),s={sign:md5X("kj5649ertj84ks89r4jh8s45hf84hjfds04k"+l).toString(),timestamp:l},a=n?B.merge(s,n):s;return await this.request(e,"post",a)}getName(){return"\u26C4\u2503\u5929\u5929\u5F71\u89C6\u2503\u26C4"}getAppName(){return"\u5929\u5929\u5F71\u89C6"}getJSName(){return"tiantian"}getType(){return 3}async init(e){await super.init(e),this.danmuStaus=!0}generateParam(e,n,l,r){let i={type_id:e,page:n,limit:r};return l.extend!==void 0&&l.extend!=="\u5168\u90E8"&&(i.class=l.extend),l.area!==void 0&&l.area!=="\u5168\u90E8"&&(i.area=l.area),l.lang!==void 0&&l.lang!=="\u5168\u90E8"&&(i.lang=l.lang),l.year!==void 0&&l.year!=="\u5168\u90E8"&&(i.year=l.year),i}async getFilter(e){let n=[];return Object.keys(e).forEach(l=>{if(Array.isArray(e[l])&&!B.isEmpty(this.extendObj[l])){let r={key:l,name:this.extendObj[l],value:[]},i=!1;for(let s of e[l])l==="year"&&!e[l].includes("2024")&&s!=="\u5168\u90E8"&&!i&&(r.value.push({n:"2024",v:"2024"}),i=!0),B.isEmpty(s)||r.value.push({n:s,v:s});r.value.length>1&&n.push(r)}}),n}async setClasses(){let e=JSON.parse(await this.postData(this.siteUrl+"/v2/type/top_type"));for(let n of e.data.list){let l=n.type_name,r=n.type_id.toString();this.classes.push(this.getTypeDic(l,r)),this.filterObj[r]=await this.getFilter(n)}}async parseVodShortListFromJson(e){let n=[];for(let l of e){let r=new Ne;r.load_data(l),B.isEmpty(r.vod_pic)&&l.vod_pic_thumb!==void 0&&(r.vod_pic=l.vod_pic_thumb),r.vod_name!=="\u9996\u9875\u8F6E\u64AD"&&n.push(r)}return n}async parseVodDetailfromJson(e){let n=new Me;n.load_data(e),n.vod_content=Ap(n.vod_content);let l=e.vod_play_list,r={};return B.each(l,i=>{let s=i.name,a="",u=i.urls,o=i.parse_urls;B.isEmpty(o)||(this.parseMap[s]=o);let c=B.map(u,f=>{let m=f.name,d=f.url;return m+"$"+d});B.isEmpty(c)||(a=c.join("#"),r[s]=a)}),n.vod_play_from=B.keys(r).join("$$$"),n.vod_play_url=B.values(r).join("$$$"),n}async setHomeVod(){let e=JSON.parse(await this.postData(this.siteUrl+"/v2/type/tj_vod")),n=[];for(let l of e.data.type_vod)l.type_name!=="\u5E7F\u544A"&&(n=await this.parseVodShortListFromJson(l.vod),this.homeVodList=[...this.homeVodList,...n]);n=await this.parseVodShortListFromJson(e.data.loop),this.homeVodList=[...this.homeVodList,...n],n=await this.parseVodShortListFromJson(e.data.cai),this.homeVodList=[...this.homeVodList,...n]}async setCategory(e,n,l,r){let s=this.generateParam(e,n,r,12),a=JSON.parse(await this.postData(this.siteUrl+"/v2/home/type_search",s));this.vodList=await this.parseVodShortListFromJson(a.data.list)}async setDetail(e){let n={vod_id:e},l=JSON.parse(await this.postData(this.siteUrl+"/v2/home/vod_details",n));this.vodDetail=await this.parseVodDetailfromJson(l.data)}async setPlay(e,n,l){let r=this.parseMap[e];if((e.indexOf("\u8292\u679C")>-1||e.indexOf("\u817E\u8BAF")>-1||e.indexOf("\u7231\u5947\u827A")>-1)&&(this.catOpenStatus||(this.danmuUrl=await this.danmuSpider.downloadDanmu("https://dmku.thefilehosting.com/?ac=dm&url="+n))),!B.isEmpty(r)){for(let i of r)if(!B.isEmpty(i))try{let s=await this.request(i+n),a=JSON.parse(s);if(!B.isEmpty(a.url)){this.playUrl=a.url;break}}catch{}}}async setSearch(e,n,l){let i={keyword:e,page:l,limit:12},s=JSON.parse(await this.postData(this.siteUrl+"/v2/home/search",i));this.vodList=await this.parseVodShortListFromJson(s.data.list);let a=parseInt(l),u=a;this.vodList.length===12&&(u=a+1),this.result.setPage(a,u,12,u)}},_n=new K6;var iS=class extends Ce{constructor(){super()}getName(){return _n.getName()}getAppName(){return _n.getAppName()}getJSName(){return _n.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await _n.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await _n.initCookie(e.server.config.bilicookie),await _n.spiderInit(e),_n.cfgObj.code=0,_n.catOpenStatus=!0,_n.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await _n.setClasses(),this.classes=_n.classes}async setFilterObj(){await _n.setFilterObj(),this.filterObj=_n.filterObj}async setHomeVod(){await _n.setHomeVod(),this.homeVodList=_n.homeVodList}async setCategory(e,n,l,r){await _n.setCategory(e,n,l,r),this.vodList=_n.vodList}async setDetail(e){await _n.setDetail(e),this.vodDetail=_n.vodDetail}async setPlay(e,n,l){await _n.setPlay(e,n,l),this.playUrl=_n.playUrl,this.result=_n.result}async setSearch(e,n,l){await _n.setSearch(e,n,l),this.vodList=_n.vodList,this.result=_n.result}async setProxy(e,n){return await _n.proxy(e,n)}},ha=new iS;async function XK(t,e){return await ha.init(t,e)}async function WK(t,e){return await ha.home(t,e)}async function Dxe(t,e){return await ha.homeVod(t,e)}async function YK(t,e){return await ha.category(t,e)}async function QK(t,e){return await ha.detail(t,e)}async function ZK(t,e){return await ha.play(t,e)}async function eX(t,e){return await ha.search(t,e)}async function Pxe(t,e){return await ha.proxy(t,e)}var tX={meta:{key:_n.getJSName(),name:_n.getName(),type:_n.getType()},api:async t=>{t.post("/init",XK),t.post("/home",WK),t.post("/category",YK),t.post("/detail",QK),t.post("/play",ZK),t.post("/search",eX),t.get("/proxy/:what/:ids/:end",Pxe)},spider:{init:XK,home:WK,homeVod:Dxe,category:YK,detail:QK,play:ZK,search:eX}};var sS=class extends Pe{constructor(){super(),this.siteUrl="https://tv.cctv.com/m/index.shtml",this.apiUrl="https://api.app.cctv.com"}getName(){return"\u{1F935}\u200D\u2642\uFE0F\u2503\u4E2D\u592E\u5F71\u89C6\u2503\u{1F935}\u200D\u2642\uFE0F"}getAppName(){return"\u4E2D\u592E\u5F71\u89C6"}getJSName(){return"cntv"}getType(){return 3}async getFilterByLive(e){let n=[],l={key:"live",name:"\u76F4\u64AD",value:[]};for(let r of e)r.appBarTitle!=="\u6700\u8FD1\u5E38\u770B"&&l.value.push({n:r.appBarTitle,v:r.pageId});return n.push(l),n}arrayIsinclude(e,n){let l=!1;for(let r of n)if(e===r.title)return!0;return l}async getFilterByTv(e){let n=[];for(let l of e){let r=!1,i={key:l.classname,name:l.title,value:[]};for(let s of l.items)l.classname==="nianfen"&&!this.arrayIsinclude("2024",l.items)&&s.title!=="\u5168\u90E8"&&!r&&(i.value.push({n:"2024",v:"2024"}),r=!0),i.value.push({n:s.title,v:s.title});n.push(i)}return n}async setClasses(){let n=this.apiUrl+"/api/navigation/iphone/AppStore/7.9.4/cctvlive",l=JSON.parse(await this.fetch(n,null,this.getHeader())),r=await this.getFilterByLive(l.data.templates),i=r[0].value[0].v;this.classes.push(this.getTypeDic("\u76F4\u64AD",i)),this.filterObj[i]=r;let a=await this.fetch("https://cbox.cctv.com/cboxpcvip/online2022/yxg/data1.jsonp?=pk",null,this.getHeader()),u=JSON.parse(a.replaceAll("pk(","").replaceAll(")",""));for(let o of u.data){let c=o.title;this.classes.push(this.getTypeDic(c,c)),this.filterObj[c]=await this.getFilterByTv(o.templates)}}parseVodShortByJson(e){let n=[];for(let l of e){let r=new Ne;r.vod_pic=l.img1,B.isEmpty(r.vod_pic)?(r.vod_pic=l.epgHorizontalPic,r.vod_id="live-"+l.epgChnlChar+"-"+r.vod_pic):(r.vod_id="play-"+l.playid+"-"+r.vod_pic,r.vod_pic=l.img1),r.vod_name=l.title,n.push(r)}return n}parseVodShortByTvJson(e){let n=[];for(let l of e){let r=new Ne;r.vod_id="url-"+l.vsetid,r.vod_name=l.title,r.vod_pic=l.image,r.vod_remarks=l.sc,n.push(r)}return n}async parseVodShortListFromJson(e){let n=[],l=!1;for(let r of e){if(r.title==="\u4ECA\u65E5\u70ED\u70B9")l=!0;else if(!B.isEmpty(r.title)&&l)break;l&&(n=[...n,...this.parseVodShortByJson(r.items)])}return n}async getLiveUrl(e,n){let l=`https://vdn.live.cntv.cn/api2/live.do?channel=pd://cctv_p2p_hd${e}&client=iosapp`,r=await req(l,{headers:this.getHeader()}),i=JSON.parse(r.content),s={};s.\u76F4\u64AD=["\u70B9\u51FB\u64AD\u653E$"+i.hls_url.hls2],await this.jadeLog.info(`liveJson:${JSON.stringify(i)}`);let a=[];for(let u of n.program){let o=u.showTime+"-"+u.t,c=i.hls_url.hls1+`?begintimeabs=${u.st*1e3}&endtimeabs=${u.et*1e3}`;a.push(o+"$"+c)}return s.\u70B9\u64AD=a.join("#"),s}async getVideoUrl(e){return{\u4E2D\u592E\u5F71\u89C6:["\u70B9\u51FB\u64AD\u653E$"+e].join("#")}}async parseVodDetailfromJson(e,n,l){let r=new Me,i,s;if(n.url!==void 0)r.vod_name=n.title,r.vod_pic=n.img,r.type_name=n.tags,r.vod_year=n.time,r.vod_content=n.vset_brief,r.vod_director=n.vset_title,i=await this.getHtml(n.url);else if(B.isEmpty(n.lvUrl))r.vod_name=n.channelName,r.vod_pic=l;else{i=await this.getHtml(n.lvUrl),r.vod_name=i("[property$=title]")[0].attribs.content,r.vod_content=i("[property$=description]")[0].attribs.content;let u=i("[property$=image]")[0].attribs.content;u.startsWith("http")||(u="https:"+u),r.vod_pic=u}B.isEmpty(i)||(s=we(/var guid = "(.*?)"/,i.html()));let a;return B.isEmpty(s)&&n.url===void 0?a=await this.getLiveUrl(e,n):a=await this.getVideoUrl(s),r.vod_play_url=B.values(a).join("$$$"),r.vod_play_from=B.keys(a).join("$$$"),r}async parseVodDetailFromJsonByTv(e){let n=new Me;n.vod_name=e.videoSetInfo.title,n.type_name=e.videoSetInfo.sc,n.vod_pic=e.videoSetInfo.image,n.vod_content=e.videoSetInfo.brief,n.vod_area=e.videoSetInfo.area;let l={},r=[];for(let i of e.videoRoughCut){let s=i.title.split("\u300B").slice(-1)[0];r.push(s+"$"+i.guid)}return l.\u4E2D\u592E\u5F71\u89C6=r.join("#"),n.vod_play_url=B.values(l).join("$$$"),n.vod_play_from=B.keys(l).join("$$$"),n}async setHomeVod(){let e=JSON.parse(await this.fetch(this.apiUrl+"/api/page/iphone/HandheldApplicationSink/7.0.0/158",null,this.getHeader()));this.homeVodList=await this.parseVodShortListFromJson(e.data.templates)}getExtendValue(e,n){return e[n]!==void 0&&e[n]!=="\u5168\u90E8"?e[n]:""}async setCategory(e,n,l,r){if(f4(e)){e=r.live??e;let i=this.apiUrl+`/api/page/iphone/HandheldApplicationSink/7.0.0/${e}`,s=JSON.parse(await this.fetch(i,null,this.getHeader()));this.vodList=this.parseVodShortByJson(s.data.templates[0].items)}else{let i=this.getExtendValue(r,"zimu"),s=this.getExtendValue(r,"diqu"),a=this.getExtendValue(r,"leixing"),u=this.getExtendValue(r,"nianfen"),o=12,c="https://api.cntv.cn/newVideoset/getCboxVideoAlbumList",f={channelid:"",sc:a,fc:e,p:n,n:o,fl:i,area:s,year:u,serviceId:"cbox"},m=JSON.parse(await this.fetch(c,f,this.getHeader()));this.vodList=this.parseVodShortByTvJson(m.data.list)}}async setDetail(e){let n=e.split("-"),l=n[0],r=n[2];if(e=n[1],l==="play"){let i=JSON.parse(await this.fetch(`https://api.cntv.cn/video/videoinfoByGuid?serviceId=cbox&guid=${e}`,null,this.getHeader()));this.vodDetail=await this.parseVodDetailfromJson(e,i,r)}else if(l==="url"){let i=`https://api.app.cctv.com/api/getVideoPageDetail?videoSetContentId=${e}`,s=JSON.parse(await this.fetch(i,null,this.getHeader()));this.vodDetail=await this.parseVodDetailFromJsonByTv(s.data)}else{let i=(await this.fetch(`https://api.cntv.cn/epg/epginfo3?serviceId=shiyi&c=${e}&cb=LiveTileShow.prototype.getEpg`,null,this.getHeader())).replaceAll("LiveTileShow.prototype.getEpg(","").replaceAll(");","");this.vodDetail=await this.parseVodDetailfromJson(e,JSON.parse(i)[e],r)}}async setSearch(e,n,l){}async setPlay(e,n,l){if(n.startsWith("http")){this.playUrl=n;let r=this.getHeader();r.Referer="https://tv.cctv.com/",this.result.header=r}else this.playUrl="https://hls.cntv.myhwcdn.cn/asp/hls/2000/0303000a/3/default/"+n+"/2000.m3u8"}},En=new sS;var aS=class extends Ce{constructor(){super()}getName(){return En.getName()}getAppName(){return En.getAppName()}getJSName(){return En.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await En.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await En.initCookie(e.server.config.bilicookie),await En.spiderInit(e),En.cfgObj.code=0,En.catOpenStatus=!0,En.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await En.setClasses(),this.classes=En.classes}async setFilterObj(){await En.setFilterObj(),this.filterObj=En.filterObj}async setHomeVod(){await En.setHomeVod(),this.homeVodList=En.homeVodList}async setCategory(e,n,l,r){await En.setCategory(e,n,l,r),this.vodList=En.vodList}async setDetail(e){await En.setDetail(e),this.vodDetail=En.vodDetail}async setPlay(e,n,l){await En.setPlay(e,n,l),this.playUrl=En.playUrl,this.result=En.result}async setSearch(e,n,l){await En.setSearch(e,n,l),this.vodList=En.vodList,this.result=En.result}async setProxy(e,n){return await En.proxy(e,n)}},ma=new aS;async function nX(t,e){return await ma.init(t,e)}async function lX(t,e){return await ma.home(t,e)}async function Lxe(t,e){return await ma.homeVod(t,e)}async function rX(t,e){return await ma.category(t,e)}async function iX(t,e){return await ma.detail(t,e)}async function sX(t,e){return await ma.play(t,e)}async function aX(t,e){return await ma.search(t,e)}async function Fxe(t,e){return await ma.proxy(t,e)}var uX={meta:{key:En.getJSName(),name:En.getName(),type:En.getType()},api:async t=>{t.post("/init",nX),t.post("/home",lX),t.post("/category",rX),t.post("/detail",iX),t.post("/play",sX),t.post("/search",aX),t.get("/proxy/:what/:ids/:end",Fxe)},spider:{init:nX,home:lX,homeVod:Lxe,category:rX,detail:iX,play:sX,search:aX}};var uS="abacdefghjklmnopqrstuvwxyzABCDEFGHJKLMNOPQRSTUVWXYZ0123456789";function Af(t,e){let n="",l=e===void 0?!0:e;for(let r=0;r<t;r++){let i=B.random(0,l?uS.length-1:uS.length-11);n+=uS[i]}return n}function jxe(){return{brand:"Huawei",model:"HUAWEI Mate 20",release:"10",buildId:Af(3,!1).toUpperCase()+B.random(11,99)+Af(1,!1).toUpperCase()}}function Uxe(t,e){return e.trim().replaceAll(t,"").replace(/<|>|《|》/g,"").replace(/\$|#/g," ").trim()}function oX(t,e){try{let n=e.url??"";if(n.startsWith("//")&&(n="https:"+n),!n.startsWith("http"))return{};let l=e.headers||{},r=(e["user-agent"]||"").trim();r.length>0&&(l["User-Agent"]=r);let i=(e.referer||"").trim();return i.length>0&&(l.Referer=i),B.keys(l).forEach(s=>{l[s]||delete l[s]}),{header:l,url:n}}catch{}return{}}var oS=class extends Pe{constructor(){super(),this.siteUrl="https://api1.baibaipei.com:8899",this.device={},this.parse=[]}getName(){return"\u{1F6E5}\uFE0E\u2503\u5FEB\u770B\u89C6\u9891\u2503\u{1F6E5}\uFE0E"}getAppName(){return"\u5FEB\u770B\u89C6\u9891"}getJSName(){return"kuaikan"}getType(){return 3}async init(e){await super.init(e),this.danmuStaus=!0,await this.setDevice()}async request(e,n,l,r){let i=VV().valueOf().toString(),s=Af(32),a=He.enc.Hex.stringify(He.MD5("H58d2%gLbeingX*%D4Y8!C!!@G_"+i+"_"+s)).toString().toLowerCase(),u={"user-agent":l||this.device.ua};e.includes("baibaipei")&&(u["device-id"]=this.device.id,u.sign=a,u.time=i,u.md5=s,u.version="2.1.5",u["system-model"]=this.device.model,u["system-brand"]=this.device.brand,u["system-version"]=this.device.release,u.host="api1.baibaipei.com:8899"),r||(u["Content-Type"]="application/x-www-form-urlencoded");let o=await req(e,{method:r?"get":"post",headers:u,data:n||{},postType:"form"});await this.jadeLog.debug(`URL:${e},headers:${JSON.stringify(u)},data:${[JSON.stringify(n)]}`);let c=o.content;try{let f=He.enc.Utf8.parse("IjhHsCB2B5^#%0Ag"),m=He.enc.Utf8.parse("y8_m.3rauW/>j,}."),d=He.enc.Base64.parse(c),y=He.AES.decrypt({ciphertext:d},f,{iv:m,padding:He.pad.Pkcs7});return y=He.enc.Utf8.stringify(y),await this.jadeLog.debug(`response:${y}`),JSON.parse(y)}catch{return JSON.parse(c)}}async setDevice(){let e="device",n=await local.get(this.siteKey,e);if(n.length>0)try{this.device=JSON.parse(n)}catch{}B.isEmpty(this.device)&&(this.device=jxe(),this.device.id=Af(13).toLowerCase(),this.device.ua="okhttp/3.14.9",await local.set(this.siteKey,e,JSON.stringify(this.device)))}async setClasses(){await this.setDevice();let e=await this.request(this.siteUrl+"/api.php/Index/getTopVideoCategory");for(let n of e.data){let l=n.nav_name;if(l==="\u63A8\u8350")continue;let r=n.nav_type_id.toString();this.classes.push({type_id:r,type_name:l})}}async getFilter(e){await this.jadeLog.debug(JSON.stringify(e));let n=[];for(let l of Object.keys(e)){let r=e[l];l==="plot"&&(l="class");let i="";switch(l){case"class":i="\u7C7B\u578B";break;case"area":i="\u5730\u533A";break;case"lang":i="\u8BED\u8A00";break;case"year":i="\u5E74\u4EE3";break;case"sort":i="\u6392\u5E8F";break}if(i.length===0)continue;let s={key:l,name:i},a=[];for(let u=0;u<r.length;u++){let o=r[u],c=l==="sort"?u+"":o==="\u5168\u90E8"?"0":o;a.push({n:o,v:c})}s.init=l==="sort"?"1":a[0].v,s.value=a,n.push(s)}return n}async setFilterObj(){for(let e of this.classes){let n=e.type_id;if(n!=="\u6700\u8FD1\u66F4\u65B0"){let l=await this.request(this.siteUrl+"/api.php/Video/getFilterType",{type:n});this.filterObj[n]=await this.getFilter(l.data)}}}async parseVodShortListFromJSONByHome(e){let n=[];for(let l of e.video){let r=await this.parseVodShortListFromJson(l.list);n.push(...r)}return n}async parseVodShortListFromJson(e){let n=[];for(let l of e){let r=new Ne;r.vod_id=l.vod_id,r.vod_name=l.vod_name,r.vod_pic=l.vod_pic,r.vod_remarks=l.vod_remarks,n.push(r)}return n}async parseVodDetailfromJson(e){let n=new Me;n.load_dic(JSON.stringify(e)),n.vod_content=e.vod_content.trim(),n.type_name=e.vod_class;let l={};for(let s of e.vod_play){let a=s.playerForm;if(a==="jp"&&this.catOpenStatus||a==="xg"&&this.catOpenStatus)continue;let u=[];for(let o of s.url)u.push(Uxe(n.vod_name,o.title)+"$"+o.play_url);!l.hasOwnProperty(a)&&u.length>0&&(l[a]=u)}this.parse=e.parse||[],n.vod_play_from=B.keys(l).join("$$$");let r=B.values(l),i=[];for(let s of r)i.push(s.join("#"));return n.vod_play_url=i.join("$$$"),n}async setHomeVod(){let e=await this.request(this.siteUrl+"/api.php/Index/getHomePage",{p:"1",type:"1"});this.homeVodList=await this.parseVodShortListFromJSONByHome(e.data)}async setCategory(e,n,l,r){n===0&&(n=1);let i=this.siteUrl+"/api.php/Video/getFilterVideoList",s=JSON.parse(io(`{
|
||||
`},timeout:.1})}async info(e,n){this.level_index<=1&&await this.log(this.formatMessage("INFO",e,n))}async warning(e,n){this.level_index<=2&&await this.log(this.formatMessage("WARNING",e,n))}async error(e,n){this.level_index<=3&&await this.log(this.formatMessage("ERROR",e,n))}async debug(e,n){this.level_index<=0&&await this.log(this.formatMessage("DEBUG",e,n))}};var Ce=class extends Pe{constructor(){super(),this.jadeLog=new $4(this.getAppName(),"DEBUG")}async init(e,n){await this.jadeLog.info("\u521D\u59CB\u5316",!0);try{await await req("http://127.0.0.1:8099/clear",{timeout:.1}),this.siteKey=this.getJSName(),this.siteType=this.getType(),this.cfgObj=e.server.config[this.siteKey],this.deviceKey=e.server.prefix+"/",this.db=e.server.db,this.catOpenStatus=!0,this.danmuStaus=!1;try{await this.loadFilterAndClasses()?await this.jadeLog.debug("\u8BFB\u53D6\u7F13\u5B58\u5217\u8868\u548C\u4E8C\u7EA7\u83DC\u5355\u6210\u529F"):(await this.jadeLog.warning("\u8BFB\u53D6\u7F13\u5B58\u5217\u8868\u548C\u4E8C\u7EA7\u83DC\u5355\u5931\u8D25"),await this.writeFilterAndClasses())}catch(l){await this.db.push(this.deviceKey+"classes",{}),await this.db.push(this.deviceKey+"filterObj",{}),await this.jadeLog.error("\u8BFB\u53D6\u7F13\u5B58\u5931\u8D25,\u5931\u8D25\u539F\u56E0\u4E3A:"+l,!1)}}catch(l){await this.jadeLog.error(`\u521D\u59CB\u5316\u5931\u8D25,\u5931\u8D25\u539F\u56E0\u4E3A:${l}`)}await this.jadeLog.info("\u521D\u59CB\u5316\u5B8C\u6210",!0)}async loadFilterAndClasses(){return this.classes=await this.getClassesCache(),this.filterObj=await this.getFiletObjCache(),this.classes.length>0?!0:(await this.db.push(this.deviceKey+"classes",{}),await this.db.push(this.deviceKey+"filterObj",{}),!1)}async writeFilterAndClasses(){this.catOpenStatus&&this.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await this.setClasses(),await this.setFilterObj(),await this.db.push(this.deviceKey+"classes",this.classes),await this.db.push(this.deviceKey+"filterObj",this.filterObj)}async getClassesCache(){let e=await this.db.getObjectDefault(this.deviceKey+"classes",{});return B.isEmpty(e)?this.classes:e}async getFiletObjCache(){let e=await this.db.getObjectDefault(this.deviceKey+"filterObj",{});return B.isEmpty(e)?this.filterObj:e}async home(e,n){return this.vodList=[],await this.jadeLog.info("\u6B63\u5728\u89E3\u6790\u9996\u9875\u7C7B\u522B",!0),await this.setHome(),await this.jadeLog.debug(`\u9996\u9875\u7C7B\u522B\u5185\u5BB9\u4E3A:${this.result.home(this.classes,[],this.filterObj)}`),await this.jadeLog.info("\u9996\u9875\u7C7B\u522B\u89E3\u6790\u5B8C\u6210",!0),this.result.home(this.classes,[],this.filterObj)}async homeVod(){await this.jadeLog.info("\u6B63\u5728\u89E3\u6790\u9996\u9875\u5185\u5BB9",!0);try{return await this.setHomeVod(),await this.jadeLog.debug(`\u9996\u9875\u5185\u5BB9\u4E3A:${this.result.homeVod(this.homeVodList)}`),await this.jadeLog.info("\u9996\u9875\u5185\u5BB9\u89E3\u6790\u5B8C\u6210",!0),this.result.homeVod(this.homeVodList)}catch(e){await this.jadeLog.error(`\u9996\u9875\u5185\u5BB9\u89E3\u6790\u5931\u8D25,\u5931\u8D25\u539F\u56E0\u4E3A:${e}`)}}async category(e,n){let l=e.body.id,r=e.body.page,i=!0,s=e.body.filters;if(this.page=parseInt(r),await this.jadeLog.info(`\u6B63\u5728\u89E3\u6790\u5206\u7C7B\u9875\u9762,tid = ${l},pg = ${r},extend = ${JSON.stringify(s)}`),l==="\u6700\u8FD1\u66F4\u65B0")return this.page=0,await this.homeVod();try{return this.vodList=[],await this.setCategory(l,r,i,s),await this.jadeLog.debug(`\u5206\u7C7B\u9875\u9762\u5185\u5BB9\u4E3A:${this.result.category(this.vodList,this.page,this.count,this.limit,this.total)}`),await this.jadeLog.info("\u5206\u7C7B\u9875\u9762\u89E3\u6790\u5B8C\u6210",!0),this.result.category(this.vodList,this.page,this.count,this.limit,this.total)}catch(a){await this.jadeLog.error(`\u5206\u7C7B\u9875\u89E3\u6790\u5931\u8D25,\u5931\u8D25\u539F\u56E0\u4E3A:${a}`)}}async detail(e,n){await this.jadeLog.debug(`\u83B7\u53D6\u8BE6\u60C5\u9875\u9762:${JSON.stringify(e.body)}`);let r=(Array.isArray(e.body.id)?e.body.id:[e.body.id])[0];this.vodDetail=new Me,await this.jadeLog.info(`\u6B63\u5728\u83B7\u53D6\u8BE6\u60C5\u9875\u9762,id\u4E3A:${r}`);try{return await this.setDetail(r),await this.jadeLog.debug(`\u8BE6\u60C5\u9875\u9762\u5185\u5BB9\u4E3A:${this.result.detail(this.vodDetail)}`),await this.jadeLog.info("\u8BE6\u60C5\u9875\u9762\u89E3\u6790\u5B8C\u6210",!0),this.vodDetail.vod_id=r,this.result.detail(this.vodDetail)}catch(i){await this.jadeLog.error("\u8BE6\u60C5\u754C\u9762\u83B7\u53D6\u5931\u8D25,\u5931\u8D25\u539F\u56E0\u4E3A:"+i)}}async play(e,n){let l=e.body.flag,r=e.body.id,i=[];await this.jadeLog.info(`\u6B63\u5728\u89E3\u6790\u64AD\u653E\u9875\u9762,flag:${l},id:${r},flags:${i}`,!0);try{let s;if(await this.setPlay(l,r,i),this.playUrl.content!==void 0)return this.playUrl;if(await this.jadeLog.debug("\u4E0D\u9700\u8981\u52A0\u8F7D\u5F39\u5E55",!0),this.result.jx===1&&this.playUrl.indexOf(".m3u8")<0){let a=await e.server.messageToDart({action:"sniff",opt:{url:r,timeout:6e4,rule:"http((?!http).){12,}?\\.m3u8?"}});if(a&&a.url){let u={};a.headers&&(a.headers["user-agent"]&&(u["User-Agent"]=a.headers["user-agent"]),a.headers.referer&&(u.Referer=a.headers.referer)),await this.jadeLog.debug(`\u55C5\u63A2\u6210\u529F,\u64AD\u653E\u8FDE\u63A5\u4E3A:${a.url}`),s=JSON.stringify({parse:0,url:a.url,header:a.headers,jx:"0"})}else await this.jadeLog.error("\u89E3\u6790\u5931\u8D25,\u65E0\u6CD5\u55C5\u63A2\u5230\u64AD\u653E\u8FDE\u63A5"),s=JSON.stringify({parse:0,url:"",jx:"0"})}else s=this.result.play(this.playUrl);return await this.jadeLog.info("\u64AD\u653E\u9875\u9762\u89E3\u6790\u5B8C\u6210",!0),await this.jadeLog.debug(`\u64AD\u653E\u9875\u9762\u5185\u5BB9\u4E3A:${s}`),s}catch(s){await this.jadeLog.error("\u89E3\u6790\u64AD\u653E\u9875\u9762\u51FA\u9519,\u5931\u8D25\u539F\u56E0\u4E3A:"+s)}}async search(e,n){let l=e.body.page,r=e.body.wd,i=!0;return this.vodList=[],await this.jadeLog.info(`\u6B63\u5728\u89E3\u6790\u641C\u7D22\u9875\u9762,\u5173\u952E\u8BCD\u4E3A = ${r},quick = ${i},pg = ${l}`),await this.setSearch(r,i,l),this.vodList.length===0&&r.indexOf(" ")>-1&&(await this.jadeLog.debug(`\u641C\u7D22\u5173\u952E\u8BCD\u4E3A:${r},\u5176\u4E2D\u6709\u7A7A\u683C,\u53BB\u9664\u7A7A\u683C\u5728\u641C\u7D22\u4E00\u6B21`),await this.search(r.replaceAll(" ","").replaceAll("?",""),i)),await this.jadeLog.debug(`\u641C\u7D22\u9875\u9762\u5185\u5BB9\u4E3A:${this.result.search(this.vodList)}`),await this.jadeLog.info("\u641C\u7D22\u9875\u9762\u89E3\u6790\u5B8C\u6210",!0),this.result.search(this.vodList)}async proxy(e,n){try{let l=e.params.what,r={};try{r=JSON.parse(e.params.ids)}catch{}let i=decodeURIComponent(e.params.end),s=JSON.parse(await this.setProxy([l,i],r));return l==="dash"?(await this.jadeLog.debug(`dash:${JSON.stringify(s)}`),n.code(s.code).headers(s.headers),s.content):s.code===200?(n.code(s.code).headers(s.headers),Buffer.from(s.content,"base64")):(n.code(500),"")}catch(l){await this.jadeLog.error(`\u4EE3\u7406\u56DE\u8C03\u5931\u8D25,\u5931\u8D25\u539F\u56E0\u4E3A:${l}`)}}};var ca=class extends Pe{constructor(){super(),this.siteUrl="http://cj.ffzyapi.com",this.remove18=!1,this.type_id_18=34}async spiderInit(e){e!==null?this.detailProxy=await js2Proxy(e,"detail",this.getHeader()):this.detailProxy=await js2Proxy(!0,this.siteType,this.siteKey,"detail/",this.getHeader())}async init(e){await super.init(e),await this.spiderInit(null)}async parseVodShortListFromJson(e,n=!1){let l=[],r;for(let i of e.list)n?(r=new Ne,r.vod_pic=this.detailProxy+n2(i.vod_id),r.vod_id=i.vod_id,r.vod_name=i.vod_name,r.vod_remarks=i.vod_remarks):r=this.parseVodDetail(i),this.remove18&&i.type_id!==this.type_id_18&&l.push(r),!this.remove18&&i.type_id===this.type_id_18&&l.push(r);return l}parseVodDetail(e){let n=new Me;n.vod_id=e.vod_id,n.vod_name=e.vod_name,n.vod_pic=e.vod_pic,n.vod_remarks=e.vod_remarks,n.vod_area=e.vod_area,n.vod_year=e.vod_year,n.vod_actor=e.vod_actor,n.vod_director=e.vod_director;let l=Ue(e.vod_content);return n.vod_content=l.text(),e.vod_down_url!==void 0&&e.vod_down_url.length>0&&(n.vod_play_from="\u76F4\u94FE\u64AD\u653E$$$",n.vod_play_url=e.vod_down_url+"$$$"),n.vod_play_from=n.vod_play_from+e.vod_play_from,n.vod_play_url=n.vod_play_url+e.vod_play_url,n.type_name=e.type_name,n}async parseVodDetailfromJson(e){let n,l=e.list;if(l.length>0){let r=l[0];n=this.parseVodDetail(r)}return n}async setClasses(){let e=await this.fetch(this.siteUrl+"/api.php/provide/vod/from",{ac:"list"},this.getHeader()),n=JSON.parse(e);for(let l of n.class)l.type_pid!==0&&this.classes.push(this.getTypeDic(l.type_name,l.type_id))}async setFilterObj(){let e=await this.fetch(this.siteUrl+"/api.php/provide/vod/from",{ac:"list"},this.getHeader()),n=JSON.parse(e);for(let l of this.classes){let r=l.type_id.toString();if(r!=="\u6700\u8FD1\u66F4\u65B0"){let i={key:"1",name:"\u5206\u7C7B",value:[{n:"\u5168\u90E8",v:r}]};for(let s of n.class){let a=s.type_name;a===this.type_name_18&&(this.type_id_18=s.type_id.toString()),this.remove18?s.type_pid===l.type_id&&a!==this.type_name_18&&i.value.push({n:a,v:s.type_id.toString()}):s.type_pid===l.type_id&&a===this.type_name_18&&i.value.push({n:a,v:s.type_id.toString()})}this.remove18?this.filterObj[r]=[i]:this.classes=[this.getTypeDic("\u6700\u8FD1\u66F4\u65B0","\u6700\u8FD1\u66F4\u65B0"),this.getTypeDic(this.type_name_18,this.type_id_18)]}}}async setHomeVod(){let e=await this.fetch(this.siteUrl+"/index.php/ajax/data",{mid:"1"},this.getHeader());this.homeVodList=await this.parseVodShortListFromJson(JSON.parse(e))}async setDetail(e){let n=await this.fetch(this.siteUrl+"/api.php/provide/vod",{ac:"detail",ids:e},this.getHeader());this.vodDetail=await this.parseVodDetailfromJson(JSON.parse(n))}async setCategory(e,n,l,r){e=r[1]??e;let i=this.siteUrl+`/index.php/ajax/data?mid=1&tid=${e}&page=${n}&limit=20`;await this.jadeLog.debug(`\u5206\u7C7BURL:${i}`);let s=await this.fetch(i,null,this.getHeader());await this.jadeLog.debug(`\u5206\u7C7B\u5185\u5BB9\u4E3A:${s}`),this.vodList=await this.parseVodShortListFromJson(JSON.parse(s))}async setSearch(e,n){let l=await this.fetch(this.siteUrl+"/api.php/provide/vod/",{wd:e},this.getHeader());this.vodList=await this.parseVodShortListFromJson(JSON.parse(l),!0)}async proxy(e,n){await this.jadeLog.debug(`\u6B63\u5728\u8BBE\u7F6E\u53CD\u5411\u4EE3\u7406 segments = ${e.join(",")},headers = ${JSON.stringify(n)}`);let l=e[0],r=_2(e[1]);if(await this.jadeLog.debug(`\u53CD\u5411\u4EE3\u7406\u53C2\u6570\u4E3A:${r}`),l==="detail"){let i=await this.fetch(this.siteUrl+"/api.php/provide/vod",{ac:"detail",ids:r},this.getHeader()),s=await this.parseVodDetailfromJson(JSON.parse(i)),a=await this.fetch(s.vod_pic,null,this.getHeader(),!1,!1,2);return B.isEmpty(a)?JSON.stringify({code:500,buffer:2,content:"",headers:{}}):JSON.stringify({code:200,buffer:2,content:a,headers:{}})}}};var Zw=class extends ca{constructor(){super(),this.siteUrl="https://haiwaikan.com",this.remove18=!0,this.type_id_18=0}async spiderInit(e){await super.spiderInit(e)}async init(e){await super.init(e),await this.spiderInit(null)}getAppName(){return"\u6D77\u5916\u770B"}getName(){return"\u2615\u2503\u6D77\u5916\u770B\u2503\u2615\u5899"}getJSName(){return"haiwaikan"}getType(){return 3}async setClasses(){let e=await this.fetch(this.siteUrl+"/api.php/provide/vod/from",{ac:"list"},this.getHeader()),n=JSON.parse(e);for(let l of n.class)l.type_id<26&&this.classes.push(this.getTypeDic(l.type_name,l.type_id.toString()));this.content_json=n}async getFilter(e,n){let l=[],r={key:"1",name:"\u5168\u90E8\u7C7B\u522B",value:[{n:"\u5168\u90E8\u7C7B\u522B",v:e.toString()}]};for(let i of n.class){let s=i.type_id,a=0,u=0;e===20&&(a=50,u=27),e===21&&(a=128,u=100),e===22&&(a=143,u=134),e===23&&(a=135,u=127),s<a&&s>u&&r.value.push({n:i.type_name,v:s.toString()})}return r.value.length>1?(l.push(r),l):null}async setFilterObj(){let e=await this.fetch(this.siteUrl+"/api.php/provide/vod/from",{ac:"list"},this.getHeader()),n=JSON.parse(e);for(let l of this.classes){let r=l.type_id;if(r!=="\u6700\u8FD1\u66F4\u65B0"){let i=await this.getFilter(parseInt(r),n);i!==null&&(this.filterObj[r]=i)}}}},yn=new Zw;var eS=class extends Ce{constructor(){super()}getName(){return yn.getName()}getAppName(){return yn.getAppName()}getJSName(){return yn.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await yn.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await yn.initCookie(e.server.config.bilicookie),await yn.spiderInit(e),yn.cfgObj.code=0,yn.catOpenStatus=!0,yn.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await yn.setClasses(),this.classes=yn.classes}async setFilterObj(){await yn.setFilterObj(),this.filterObj=yn.filterObj}async setHomeVod(){await yn.setHomeVod(),this.homeVodList=yn.homeVodList}async setCategory(e,n,l,r){await yn.setCategory(e,n,l,r),this.vodList=yn.vodList}async setDetail(e){await yn.setDetail(e),this.vodDetail=yn.vodDetail}async setPlay(e,n,l){await yn.setPlay(e,n,l),this.playUrl=yn.playUrl,this.result=yn.result}async setSearch(e,n,l){await yn.setSearch(e,n,l),this.vodList=yn.vodList,this.result=yn.result}async setProxy(e,n){return await yn.proxy(e,n)}},pa=new eS;async function NK(t,e){return await pa.init(t,e)}async function CK(t,e){return await pa.home(t,e)}async function Axe(t,e){return await pa.homeVod(t,e)}async function RK(t,e){return await pa.category(t,e)}async function IK(t,e){return await pa.detail(t,e)}async function kK(t,e){return await pa.play(t,e)}async function DK(t,e){return await pa.search(t,e)}async function Oxe(t,e){return await pa.proxy(t,e)}var PK={meta:{key:yn.getJSName(),name:yn.getName(),type:yn.getType()},api:async t=>{t.post("/init",NK),t.post("/home",CK),t.post("/category",RK),t.post("/detail",IK),t.post("/play",kK),t.post("/search",DK),t.get("/proxy/:what/:ids/:end",Oxe)},spider:{init:NK,home:CK,homeVod:Axe,category:RK,detail:IK,play:kK,search:DK}};function Tf(t,e){let n=xf();return Tf=function(l,r){return l=l-424,n[l]},Tf(t,e)}function xf(){let t=["1580630GngmmA","117uvwflw","join","current_id","565448Apkhig","23092JwmytW","707152yowhOv","getElementById","855936CGaczt","length","2966831GCGpvn","611266nfcTEf","value","substring"];return xf=function(){return t},xf()}(function(t,e){let n=Tf,l=t();for(;;)try{if(-parseInt(n(436))/1+parseInt(n(429))/2+-parseInt(n(433))/3*(-parseInt(n(437))/4)+-parseInt(n(432))/5+parseInt(n(426))/6+parseInt(n(428))/7+parseInt(n(424))/8===e)break;l.push(l.shift())}catch{l.push(l.shift())}})(xf,304089);function Nxe(t,e){let n=Tf,l=t,r=e;if(!l||!r)return;let i=l.length,s=l[n(431)](i-4,i),a=[];for(let u=0;u<s[n(427)];u++){let o=parseInt(s[u]),c=o%3+1;a[u]=r[n(431)](c,c+8),r=r[n(431)](c+8,r[n(427)])}return a[n(434)]("")}var tS=class extends Pe{constructor(){super(),this.siteUrl="https://v.ikanbot.com"}getName(){return"\u{1F916}\u2503\u7231\u770B\u673A\u5668\u4EBA\u2503\u{1F916}"}getAppName(){return"\u7231\u770B\u673A\u5668\u4EBA"}getJSName(){return"ikanbot"}getType(){return 3}async spiderInit(e=null){e!==null?this.jsBase=await js2Proxy(e,"img",this.getHeader()):this.jsBase=await js2Proxy(!0,this.siteType,this.siteKey,"img/",this.getHeader())}async init(e){await super.init(e),await this.spiderInit(null)}async parseVodShortListFromDoc(e){let n=[],l=e(e('[class="row list-wp"]')).find("a");for(let r of l){let i=new Ne,s=e(r).find("img")[0];i.vod_id=r.attribs.href,i.vod_pic=this.jsBase+n2(s.attribs["data-src"]),i.vod_name=s.attribs.alt,n.push(i)}return n}getChildren(e,n){try{return e[n].children[0].data}catch{return""}}async parseVodDetailFromDoc(e){let n=e("div.detail > .meta"),l=new Me;l.vod_pic=this.jsBase+n2(e("div.item-root > img")[0].attribs["data-src"]),l.vod_name=this.getChildren(n,0),l.vod_year=this.getChildren(n,1),l.vod_area=this.getChildren(n,3),l.vod_actor=this.getChildren(n,4);let r=we(/<input type="hidden" id="current_id" value="(.*?)"/,e.html()),i=we(/<input type="hidden" id="e_token" value="(.*?)"/,e.html()),s=we(/<input type="hidden" id="mtype" value="(.*?)"/,e.html()),a={videoId:r,mtype:s,token:Nxe(r,i)},u=await this.fetch(this.siteUrl+"/api/getResN",a,this.getHeader()),o=JSON.parse(u).data.list,c={},f=0,m=[];for(let d of o){let y=JSON.parse(d.resData);for(let _ of y){f=f+1;let S=_.flag,w=_.url;!S||!w||c[S]||(m.push(`\u7EBF\u8DEF${f}`),c[S]=w)}}return l.vod_play_from=m.join("$$$"),l.vod_play_url=B.values(c).join("$$$"),l}async parseVodShortListFromDocBySearch(e){let n=[],l=e("div.media > div.media-left > a");for(let r of l){let i=new Ne,s=e(r).find("img:first")[0];i.vod_id=r.attribs.href,i.vod_name=s.attribs.alt,i.vod_pic=this.jsBase+n2(s.attribs["data-src"]),n.push(i)}return n}async setClasses(){let e=await this.fetch(this.siteUrl+"/category",null,this.getHeader());if(!B.isEmpty(e)){let n=Ue(e),l=n(n(n('[class="row visible-xs-block visible-sm-block"]')).find("li")).find("a");for(let r of l)this.classes.push({type_name:n(r).text(),type_id:r.attribs.href})}}async setFilterObj(){for(let e of this.classes.slice(1,9)){let n=e.type_id;if(n.indexOf("category")===-1||n.indexOf(",")>-1){let l=n.split(",").slice(-1)[0],r=await this.fetch(this.siteUrl+l,null,this.getHeader());if(!B.isEmpty(r)){let i=Ue(r),s=i('[class="row visible-xs-block visible-sm-block"]'),a=s.find('[class="nav nav-pills"]').find("a"),u=[];n.indexOf(",")>-1&&u.push({n:"\u5168\u90E8",v:n.split(",")[0]});let o={key:n,name:i(s.find("h5")).text(),value:u};for(let c of a)u.push({n:i(c).text(),v:c.attribs.href});u.length>0&&(this.filterObj[n]=[o])}}}}async setHomeVod(){let e=await this.fetch(this.siteUrl,null,this.getHeader());if(!B.isEmpty(e)){let n=Ue(e);this.homeVodList=await this.parseVodShortListFromDoc(n)}}async setCategory(e,n,l,r){let i=this.siteUrl+(r[e]||e.split(",")[0]),s=!1;i.indexOf("html")>-1?i=i.replace(".html",n>1?`-p-${n}.html`:".html"):(i=i+`?p=${n}`,s=!0),await this.jadeLog.debug(`\u5206\u7C7BURL:${i}`);let a=await this.fetch(i,null,this.getHeader());if(!B.isEmpty(a)){let u=Ue(a);this.vodList=await this.parseVodShortListFromDoc(u);let o=u("div.page-more > a:contains(\u4E0B\u4E00\u9875)");s&&(this.page=parseInt(o[0].attribs.href.split("p=")[1]));let c=o.length>0;this.limit=24,this.count=c?parseInt(n)+1:parseInt(n),this.total=this.limit*this.count}}async setDetail(e){let n=await this.fetch(this.siteUrl+e,null,this.getHeader());if(!B.isEmpty(n)){let l=Ue(n);this.vodDetail=await this.parseVodDetailFromDoc(l)}}async setSearch(e,n){let l=await this.fetch(this.siteUrl+"/search?q="+e,null,this.getHeader());if(!B.isEmpty(l)){let r=Ue(l);this.vodList=await this.parseVodShortListFromDocBySearch(r)}}async setPlay(e,n,l){this.playUrl=n}},gn=new tS;var nS=class extends Ce{constructor(){super()}getName(){return gn.getName()}getAppName(){return gn.getAppName()}getJSName(){return gn.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await gn.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await gn.initCookie(e.server.config.bilicookie),await gn.spiderInit(e),gn.cfgObj.code=0,gn.catOpenStatus=!0,gn.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await gn.setClasses(),this.classes=gn.classes}async setFilterObj(){await gn.setFilterObj(),this.filterObj=gn.filterObj}async setHomeVod(){await gn.setHomeVod(),this.homeVodList=gn.homeVodList}async setCategory(e,n,l,r){await gn.setCategory(e,n,l,r),this.vodList=gn.vodList}async setDetail(e){await gn.setDetail(e),this.vodDetail=gn.vodDetail}async setPlay(e,n,l){await gn.setPlay(e,n,l),this.playUrl=gn.playUrl,this.result=gn.result}async setSearch(e,n,l){await gn.setSearch(e,n,l),this.vodList=gn.vodList,this.result=gn.result}async setProxy(e,n){return await gn.proxy(e,n)}},fa=new nS;async function LK(t,e){return await fa.init(t,e)}async function FK(t,e){return await fa.home(t,e)}async function Cxe(t,e){return await fa.homeVod(t,e)}async function jK(t,e){return await fa.category(t,e)}async function UK(t,e){return await fa.detail(t,e)}async function MK(t,e){return await fa.play(t,e)}async function $K(t,e){return await fa.search(t,e)}async function Rxe(t,e){return await fa.proxy(t,e)}var BK={meta:{key:gn.getJSName(),name:gn.getName(),type:gn.getType()},api:async t=>{t.post("/init",LK),t.post("/home",FK),t.post("/category",jK),t.post("/detail",UK),t.post("/play",MK),t.post("/search",$K),t.get("/proxy/:what/:ids/:end",Rxe)},spider:{init:LK,home:FK,homeVod:Cxe,category:jK,detail:UK,play:MK,search:$K}};var lS=class extends Pe{constructor(){super(),this.siteUrl="https://ali.gitcafe.ink"}getName(){return"\u{1F98A}\u2503\u963F\u91CC\u7EB8\u6761\u2503\u{1F98A}"}getAppName(){return"\u963F\u91CC\u7EB8\u6761"}getJSName(){return"gitcafe"}getType(){return 3}async getApiUrl(){let e=await this.fetch(this.siteUrl,null,this.getHeader());if(!B.isEmpty(e)){let n=we(/<script src='(.*?)'><\/script>/,e),l=await this.fetch(n,null,this.getHeader());return{api:"https:"+we(/ return '(.*?)' \+ /,l)+new Date().getTime(),search_api:we(/const SEARCH_API = '(.*?)';/,l)}}}async getContentJson(){let e=await this.getApiUrl(),n=await this.fetch(e.api,null,this.getHeader());if(this.search_api=e.search_api,!B.isEmpty(n))return JSON.parse(n)}async spiderInit(){this.content_json=await this.getContentJson(),this.token_dic=await this.load_cache()}async init(e){await this.spiderInit(),await super.init(e),await z2(this.cfgObj.token)}async parseClassFromJson(e){let n=Object.keys(e.data).slice(0,19);for(let l of n)this.classes.push({type_name:e.data[l].name,type_id:l})}async parseVodShortListFromJson(e){let n=[],l=this.getClassIdList();for(let r of e){let i=new Ne;l.includes(r.cat)&&(i.vod_id=JSON.stringify(r),i.vod_name=r.title,i.vod_remarks=r.date,n.push(i))}return n}async parseVodDetailfromJson(e){let n=this.getClassNameList(),l=this.getClassIdList(),r=new Me;r.vod_name=e.title,r.vod_remarks=e.creatime??e.date,r.type_name=n[l.indexOf(e.cat)],r.vod_content=e.des;let i="https://www.aliyundrive.com/s/"+e.alikey,s=await x3([i]);return r.vod_play_url=s.vod_play_url,r.vod_play_from=s.vod_play_from,r}async setClasses(){await this.parseClassFromJson(this.content_json)}async setHomeVod(){this.homeVodList=await this.parseVodShortListFromJson(this.content_json.info.new)}async setDetail(e){let n=JSON.parse(e);this.vodDetail=await this.parseVodDetailfromJson(n)}async setCategory(e,n,l,r){this.vodList=await this.parseVodShortListFromJson(this.content_json.data[e].catdata)}async setSearch(e,n){await this.refreshToken();let l={action:"search",from:"web",token:this.token_dic.token,keyword:e},r=await this.post(this.search_api,l,this.getHeader());if(!B.isEmpty(r)){let i=JSON.parse(r);this.vodList=await this.parseVodShortListFromJson(i.data)}}async refreshToken(){let e=new Date().getTime();B.isEmpty(this.token_dic.token)?(await this.get_token(),await this.jadeLog.debug("Token\u4E3A\u7A7A,\u5237\u65B0Token")):e-parseInt(this.token_dic.date)>24*60*60*1e3?(await this.jadeLog.debug(`Token\u5230\u671F,\u4E0A\u6B21\u83B7\u53D6Token\u65F6\u95F4\u4E3A:${e},\u5F53\u524D\u65F6\u95F4\u4E3A:${parseInt(this.token_dic.date)},\u5237\u65B0Token`),await this.get_token()):await this.jadeLog.debug("Token\u4ECD\u7136\u6709\u6548,\u65E0\u9700\u5237\u65B0",!0)}async get_token(){try{let e={action:"get_token",from:"web"},n=await this.post(this.search_api,e,this.getHeader());if(!B.isEmpty(n)){let l=JSON.parse(n),r=new Date().getTime();this.token_dic.token=l.data,this.token_dic.date=r.toString(),await this.write_cache()}}catch(e){await this.jadeLog.error("\u83B7\u53D6Token\u5931\u8D25,\u5931\u8D25\u539F\u56E0\u4E3A:"+e)}}async write_cache(){await local.set("gitcafe_token","token",JSON.stringify(this.token_dic))}async load_cache(){try{let e=await local.get("gitcafe_token","token");return JSON.parse(e)}catch{return{token:"",date:""}}}async play(e,n,l){return await A3(e,n,l)}},vn=new lS;var rS=class extends Ce{constructor(){super()}getName(){return vn.getName()}getAppName(){return vn.getAppName()}getJSName(){return vn.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await vn.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await vn.initCookie(e.server.config.bilicookie),await vn.spiderInit(e),vn.cfgObj.code=0,vn.catOpenStatus=!0,vn.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await vn.setClasses(),this.classes=vn.classes}async setFilterObj(){await vn.setFilterObj(),this.filterObj=vn.filterObj}async setHomeVod(){await vn.setHomeVod(),this.homeVodList=vn.homeVodList}async setCategory(e,n,l,r){await vn.setCategory(e,n,l,r),this.vodList=vn.vodList}async setDetail(e){await vn.setDetail(e),this.vodDetail=vn.vodDetail}async setPlay(e,n,l){await vn.setPlay(e,n,l),this.playUrl=vn.playUrl,this.result=vn.result}async setSearch(e,n,l){await vn.setSearch(e,n,l),this.vodList=vn.vodList,this.result=vn.result}async setProxy(e,n){return await vn.proxy(e,n)}},da=new rS;async function HK(t,e){return await da.init(t,e)}async function VK(t,e){return await da.home(t,e)}async function Ixe(t,e){return await da.homeVod(t,e)}async function qK(t,e){return await da.category(t,e)}async function zK(t,e){return await da.detail(t,e)}async function GK(t,e){return await da.play(t,e)}async function JK(t,e){return await da.search(t,e)}async function kxe(t,e){return await da.proxy(t,e)}var KK={meta:{key:vn.getJSName(),name:vn.getName(),type:vn.getType()},api:async t=>{t.post("/init",HK),t.post("/home",VK),t.post("/category",qK),t.post("/detail",zK),t.post("/play",GK),t.post("/search",JK),t.get("/proxy/:what/:ids/:end",kxe)},spider:{init:HK,home:VK,homeVod:Ixe,category:qK,detail:zK,play:GK,search:JK}};var K6=class extends Pe{constructor(){super(),this.siteUrl="http://op.ysdqjs.cn",this.cookie="",this.extendObj={extend:"\u7C7B\u578B",area:"\u5730\u533A",year:"\u5E74\u4EE3"},this.parseMap={}}async request(e,n,l){let r={"User-Agent":Gl};B.isEmpty(this.cookie)||(r.Cookie=this.cookie);let i=n==="post"?"form-data":"",s=await req(e,{method:n||"get",headers:r,data:l,postType:i});if(s.code===403){let a=s.data.match(/window\.location\.href ="(.*?)"/)[1];this.cookie=B.isArray(s.headers["set-cookie"])?s.headers["set-cookie"].join(";"):s.headers["set-cookie"],r.Cookie=this.cookie,s=await req(this.siteUrl+a,{method:n||"get",headers:r,data:l,postType:i})}return s.content}async postData(e,n){let l=Math.floor(new Date().getTime()/1e3),s={sign:md5X("kj5649ertj84ks89r4jh8s45hf84hjfds04k"+l).toString(),timestamp:l},a=n?B.merge(s,n):s;return await this.request(e,"post",a)}getName(){return"\u26C4\u2503\u5929\u5929\u5F71\u89C6\u2503\u26C4"}getAppName(){return"\u5929\u5929\u5F71\u89C6"}getJSName(){return"tiantian"}getType(){return 3}async init(e){await super.init(e),this.danmuStaus=!0}generateParam(e,n,l,r){let i={type_id:e,page:n,limit:r};return l.extend!==void 0&&l.extend!=="\u5168\u90E8"&&(i.class=l.extend),l.area!==void 0&&l.area!=="\u5168\u90E8"&&(i.area=l.area),l.lang!==void 0&&l.lang!=="\u5168\u90E8"&&(i.lang=l.lang),l.year!==void 0&&l.year!=="\u5168\u90E8"&&(i.year=l.year),i}async getFilter(e){let n=[];return Object.keys(e).forEach(l=>{if(Array.isArray(e[l])&&!B.isEmpty(this.extendObj[l])){let r={key:l,name:this.extendObj[l],value:[]},i=!1;for(let s of e[l])l==="year"&&!e[l].includes("2024")&&s!=="\u5168\u90E8"&&!i&&(r.value.push({n:"2024",v:"2024"}),i=!0),B.isEmpty(s)||r.value.push({n:s,v:s});r.value.length>1&&n.push(r)}}),n}async setClasses(){let e=JSON.parse(await this.postData(this.siteUrl+"/v2/type/top_type"));for(let n of e.data.list){let l=n.type_name,r=n.type_id.toString();this.classes.push(this.getTypeDic(l,r)),this.filterObj[r]=await this.getFilter(n)}}async parseVodShortListFromJson(e){let n=[];for(let l of e){let r=new Ne;r.load_data(l),B.isEmpty(r.vod_pic)&&l.vod_pic_thumb!==void 0&&(r.vod_pic=l.vod_pic_thumb),r.vod_name!=="\u9996\u9875\u8F6E\u64AD"&&n.push(r)}return n}async parseVodDetailfromJson(e){let n=new Me;n.load_data(e),n.vod_content=Ap(n.vod_content);let l=e.vod_play_list,r={};return B.each(l,i=>{let s=i.name,a="",u=i.urls,o=i.parse_urls;B.isEmpty(o)||(this.parseMap[s]=o);let c=B.map(u,f=>{let m=f.name,d=f.url;return m+"$"+d});B.isEmpty(c)||(a=c.join("#"),r[s]=a)}),n.vod_play_from=B.keys(r).join("$$$"),n.vod_play_url=B.values(r).join("$$$"),n}async setHomeVod(){let e=JSON.parse(await this.postData(this.siteUrl+"/v2/type/tj_vod")),n=[];for(let l of e.data.type_vod)l.type_name!=="\u5E7F\u544A"&&(n=await this.parseVodShortListFromJson(l.vod),this.homeVodList=[...this.homeVodList,...n]);n=await this.parseVodShortListFromJson(e.data.loop),this.homeVodList=[...this.homeVodList,...n],n=await this.parseVodShortListFromJson(e.data.cai),this.homeVodList=[...this.homeVodList,...n]}async setCategory(e,n,l,r){let s=this.generateParam(e,n,r,12),a=JSON.parse(await this.postData(this.siteUrl+"/v2/home/type_search",s));this.vodList=await this.parseVodShortListFromJson(a.data.list)}async setDetail(e){let n={vod_id:e},l=JSON.parse(await this.postData(this.siteUrl+"/v2/home/vod_details",n));this.vodDetail=await this.parseVodDetailfromJson(l.data)}async setPlay(e,n,l){let r=this.parseMap[e];if((e.indexOf("\u8292\u679C")>-1||e.indexOf("\u817E\u8BAF")>-1||e.indexOf("\u7231\u5947\u827A")>-1)&&(this.catOpenStatus||(this.danmuUrl=await this.danmuSpider.downloadDanmu("https://dmku.thefilehosting.com/?ac=dm&url="+n))),!B.isEmpty(r)){for(let i of r)if(!B.isEmpty(i))try{let s=await this.request(i+n),a=JSON.parse(s);if(!B.isEmpty(a.url)){this.playUrl=a.url;break}}catch{}}}async setSearch(e,n,l){let i={keyword:e,page:l,limit:12},s=JSON.parse(await this.postData(this.siteUrl+"/v2/home/search",i));this.vodList=await this.parseVodShortListFromJson(s.data.list);let a=parseInt(l),u=a;this.vodList.length===12&&(u=a+1),this.result.setPage(a,u,12,u)}},_n=new K6;var iS=class extends Ce{constructor(){super()}getName(){return _n.getName()}getAppName(){return _n.getAppName()}getJSName(){return _n.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await _n.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await _n.initCookie(e.server.config.bilicookie),await _n.spiderInit(e),_n.cfgObj.code=0,_n.catOpenStatus=!0,_n.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await _n.setClasses(),this.classes=_n.classes}async setFilterObj(){await _n.setFilterObj(),this.filterObj=_n.filterObj}async setHomeVod(){await _n.setHomeVod(),this.homeVodList=_n.homeVodList}async setCategory(e,n,l,r){await _n.setCategory(e,n,l,r),this.vodList=_n.vodList}async setDetail(e){await _n.setDetail(e),this.vodDetail=_n.vodDetail}async setPlay(e,n,l){await _n.setPlay(e,n,l),this.playUrl=_n.playUrl,this.result=_n.result}async setSearch(e,n,l){await _n.setSearch(e,n,l),this.vodList=_n.vodList,this.result=_n.result}async setProxy(e,n){return await _n.proxy(e,n)}},ha=new iS;async function XK(t,e){return await ha.init(t,e)}async function WK(t,e){return await ha.home(t,e)}async function Dxe(t,e){return await ha.homeVod(t,e)}async function YK(t,e){return await ha.category(t,e)}async function QK(t,e){return await ha.detail(t,e)}async function ZK(t,e){return await ha.play(t,e)}async function eX(t,e){return await ha.search(t,e)}async function Pxe(t,e){return await ha.proxy(t,e)}var tX={meta:{key:_n.getJSName(),name:_n.getName(),type:_n.getType()},api:async t=>{t.post("/init",XK),t.post("/home",WK),t.post("/category",YK),t.post("/detail",QK),t.post("/play",ZK),t.post("/search",eX),t.get("/proxy/:what/:ids/:end",Pxe)},spider:{init:XK,home:WK,homeVod:Dxe,category:YK,detail:QK,play:ZK,search:eX}};var sS=class extends Pe{constructor(){super(),this.siteUrl="https://tv.cctv.com/m/index.shtml",this.apiUrl="https://api.app.cctv.com",this.liveJsonUrl="https://gh.con.sh/https://github.com/jadehh/LiveSpider/blob/main/json/live.json"}getName(){return"\u{1F935}\u200D\u2642\uFE0F\u2503\u4E2D\u592E\u5F71\u89C6\u2503\u{1F935}\u200D\u2642\uFE0F"}getAppName(){return"\u4E2D\u592E\u5F71\u89C6"}getJSName(){return"cntv"}getType(){return 3}async spiderInit(){await super.spiderInit(),this.liveJson=JSON.parse(await this.fetch(this.liveJsonUrl,null,null))}async init(e){await super.init(e),await this.spiderInit()}async getFilterByLive(e){let n=[],l={key:"live",name:"\u76F4\u64AD",value:[]};for(let r of e)r.appBarTitle!=="\u6700\u8FD1\u5E38\u770B"&&l.value.push({n:r.appBarTitle,v:r.pageId});return n.push(l),n}arrayIsinclude(e,n){let l=!1;for(let r of n)if(e===r.title)return!0;return l}async getFilterByTv(e){let n=[];for(let l of e){let r=!1,i={key:l.classname,name:l.title,value:[]};for(let s of l.items)l.classname==="nianfen"&&!this.arrayIsinclude("2024",l.items)&&s.title!=="\u5168\u90E8"&&!r&&(i.value.push({n:"2024",v:"2024"}),r=!0),i.value.push({n:s.title,v:s.title});n.push(i)}return n}async setClasses(){let n=this.apiUrl+"/api/navigation/iphone/AppStore/7.9.4/cctvlive",l=JSON.parse(await this.fetch(n,null,this.getHeader())),r=await this.getFilterByLive(l.data.templates),i=r[0].value[0].v;this.classes.push(this.getTypeDic("\u76F4\u64AD",i)),this.filterObj[i]=r;let a=await this.fetch("https://cbox.cctv.com/cboxpcvip/online2022/yxg/data1.jsonp?=pk",null,this.getHeader()),u=JSON.parse(a.replaceAll("pk(","").replaceAll(")",""));for(let o of u.data){let c=o.title;this.classes.push(this.getTypeDic(c,c)),this.filterObj[c]=await this.getFilterByTv(o.templates)}}parseVodShortByJson(e){let n=[];for(let l of e){let r=new Ne;r.vod_pic=l.img1,B.isEmpty(r.vod_pic)?(r.vod_pic=l.epgHorizontalPic,r.vod_id="live-"+l.epgChnlChar+"-"+r.vod_pic):(r.vod_id="play-"+l.playid+"-"+r.vod_pic,r.vod_pic=l.img1),r.vod_name=l.title,n.push(r)}return n}parseVodShortByTvJson(e){let n=[];for(let l of e){let r=new Ne;r.vod_id="url-"+l.vsetid,r.vod_name=l.title,r.vod_pic=l.image,r.vod_remarks=l.sc,n.push(r)}return n}async parseVodShortListFromJson(e){let n=[],l=!1;for(let r of e){if(r.title==="\u4ECA\u65E5\u70ED\u70B9")l=!0;else if(!B.isEmpty(r.title)&&l)break;l&&(n=[...n,...this.parseVodShortByJson(r.items)])}return n}async getLiveUrl(e,n){let l=`https://vdn.live.cntv.cn/api2/live.do?channel=pd://cctv_p2p_hd${e}&client=iosapp`,r=await req(l,{headers:this.getHeader()}),i=JSON.parse(r.content),s={},a=n.channelName.split(" ")[0].replaceAll("-","").toLowerCase(),u=this.liveJson[a]??i.hls_url.hls2;s.\u76F4\u64AD=["\u70B9\u51FB\u64AD\u653E$"+u],await this.jadeLog.info(`liveJson:${JSON.stringify(i)}`);let o=[];if(this.liveJson[a]===void 0)for(let c of n.program){let f=c.showTime+"-"+c.t,m=u+`?begintimeabs=${c.st*1e3}&endtimeabs=${c.et*1e3}`;o.push(f+"$"+m)}return o.length>0&&(s.\u70B9\u64AD=o.join("#")),s}async getVideoUrl(e){return{\u4E2D\u592E\u5F71\u89C6:["\u70B9\u51FB\u64AD\u653E$"+e].join("#")}}async parseVodDetailfromJson(e,n,l){let r=new Me,i,s;if(n.url!==void 0)r.vod_name=n.title,r.vod_pic=n.img,r.type_name=n.tags,r.vod_year=n.time,r.vod_content=n.vset_brief,r.vod_director=n.vset_title,i=await this.getHtml(n.url);else if(B.isEmpty(n.lvUrl))r.vod_name=n.channelName,r.vod_pic=l;else{i=await this.getHtml(n.lvUrl),r.vod_name=i("[property$=title]")[0].attribs.content,r.vod_content=i("[property$=description]")[0].attribs.content;let u=i("[property$=image]")[0].attribs.content;u.startsWith("http")||(u="https:"+u),r.vod_pic=u}B.isEmpty(i)||(s=we(/var guid = "(.*?)"/,i.html()));let a;return B.isEmpty(s)&&n.url===void 0?a=await this.getLiveUrl(e,n):a=await this.getVideoUrl(s),r.vod_play_url=B.values(a).join("$$$"),r.vod_play_from=B.keys(a).join("$$$"),r}async parseVodDetailFromJsonByTv(e){let n=new Me;n.vod_name=e.videoSetInfo.title,n.type_name=e.videoSetInfo.sc,n.vod_pic=e.videoSetInfo.image,n.vod_content=e.videoSetInfo.brief,n.vod_area=e.videoSetInfo.area;let l={},r=[];for(let i of e.videoRoughCut){let s=i.title.split("\u300B").slice(-1)[0];r.push(s+"$"+i.guid)}return l.\u4E2D\u592E\u5F71\u89C6=r.join("#"),n.vod_play_url=B.values(l).join("$$$"),n.vod_play_from=B.keys(l).join("$$$"),n}async setHomeVod(){let e=JSON.parse(await this.fetch(this.apiUrl+"/api/page/iphone/HandheldApplicationSink/7.0.0/158",null,this.getHeader()));this.homeVodList=await this.parseVodShortListFromJson(e.data.templates)}getExtendValue(e,n){return e[n]!==void 0&&e[n]!=="\u5168\u90E8"?e[n]:""}async setCategory(e,n,l,r){if(f4(e)){e=r.live??e;let i=this.apiUrl+`/api/page/iphone/HandheldApplicationSink/7.0.0/${e}`,s=JSON.parse(await this.fetch(i,null,this.getHeader()));this.vodList=this.parseVodShortByJson(s.data.templates[0].items)}else{let i=this.getExtendValue(r,"zimu"),s=this.getExtendValue(r,"diqu"),a=this.getExtendValue(r,"leixing"),u=this.getExtendValue(r,"nianfen"),o=12,c="https://api.cntv.cn/newVideoset/getCboxVideoAlbumList",f={channelid:"",sc:a,fc:e,p:n,n:o,fl:i,area:s,year:u,serviceId:"cbox"},m=JSON.parse(await this.fetch(c,f,this.getHeader()));this.vodList=this.parseVodShortByTvJson(m.data.list)}}async setDetail(e){let n=e.split("-"),l=n[0],r=n[2];if(e=n[1],l==="play"){let i=JSON.parse(await this.fetch(`https://api.cntv.cn/video/videoinfoByGuid?serviceId=cbox&guid=${e}`,null,this.getHeader()));this.vodDetail=await this.parseVodDetailfromJson(e,i,r)}else if(l==="url"){let i=`https://api.app.cctv.com/api/getVideoPageDetail?videoSetContentId=${e}`,s=JSON.parse(await this.fetch(i,null,this.getHeader()));this.vodDetail=await this.parseVodDetailFromJsonByTv(s.data)}else{let i=(await this.fetch(`https://api.cntv.cn/epg/epginfo3?serviceId=shiyi&c=${e}&cb=LiveTileShow.prototype.getEpg`,null,this.getHeader())).replaceAll("LiveTileShow.prototype.getEpg(","").replaceAll(");","");this.vodDetail=await this.parseVodDetailfromJson(e,JSON.parse(i)[e],r)}}async setSearch(e,n,l){}async setPlay(e,n,l){if(n.startsWith("http")){this.playUrl=n;let r=this.getHeader();r.Referer="https://tv.cctv.com/",this.result.header=r}else this.playUrl="https://hls.cntv.myhwcdn.cn/asp/hls/2000/0303000a/3/default/"+n+"/2000.m3u8"}},En=new sS;var aS=class extends Ce{constructor(){super()}getName(){return En.getName()}getAppName(){return En.getAppName()}getJSName(){return En.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await En.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await En.initCookie(e.server.config.bilicookie),await En.spiderInit(e),En.cfgObj.code=0,En.catOpenStatus=!0,En.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await En.setClasses(),this.classes=En.classes}async setFilterObj(){await En.setFilterObj(),this.filterObj=En.filterObj}async setHomeVod(){await En.setHomeVod(),this.homeVodList=En.homeVodList}async setCategory(e,n,l,r){await En.setCategory(e,n,l,r),this.vodList=En.vodList}async setDetail(e){await En.setDetail(e),this.vodDetail=En.vodDetail}async setPlay(e,n,l){await En.setPlay(e,n,l),this.playUrl=En.playUrl,this.result=En.result}async setSearch(e,n,l){await En.setSearch(e,n,l),this.vodList=En.vodList,this.result=En.result}async setProxy(e,n){return await En.proxy(e,n)}},ma=new aS;async function nX(t,e){return await ma.init(t,e)}async function lX(t,e){return await ma.home(t,e)}async function Lxe(t,e){return await ma.homeVod(t,e)}async function rX(t,e){return await ma.category(t,e)}async function iX(t,e){return await ma.detail(t,e)}async function sX(t,e){return await ma.play(t,e)}async function aX(t,e){return await ma.search(t,e)}async function Fxe(t,e){return await ma.proxy(t,e)}var uX={meta:{key:En.getJSName(),name:En.getName(),type:En.getType()},api:async t=>{t.post("/init",nX),t.post("/home",lX),t.post("/category",rX),t.post("/detail",iX),t.post("/play",sX),t.post("/search",aX),t.get("/proxy/:what/:ids/:end",Fxe)},spider:{init:nX,home:lX,homeVod:Lxe,category:rX,detail:iX,play:sX,search:aX}};var uS="abacdefghjklmnopqrstuvwxyzABCDEFGHJKLMNOPQRSTUVWXYZ0123456789";function Af(t,e){let n="",l=e===void 0?!0:e;for(let r=0;r<t;r++){let i=B.random(0,l?uS.length-1:uS.length-11);n+=uS[i]}return n}function jxe(){return{brand:"Huawei",model:"HUAWEI Mate 20",release:"10",buildId:Af(3,!1).toUpperCase()+B.random(11,99)+Af(1,!1).toUpperCase()}}function Uxe(t,e){return e.trim().replaceAll(t,"").replace(/<|>|《|》/g,"").replace(/\$|#/g," ").trim()}function oX(t,e){try{let n=e.url??"";if(n.startsWith("//")&&(n="https:"+n),!n.startsWith("http"))return{};let l=e.headers||{},r=(e["user-agent"]||"").trim();r.length>0&&(l["User-Agent"]=r);let i=(e.referer||"").trim();return i.length>0&&(l.Referer=i),B.keys(l).forEach(s=>{l[s]||delete l[s]}),{header:l,url:n}}catch{}return{}}var oS=class extends Pe{constructor(){super(),this.siteUrl="https://api1.baibaipei.com:8899",this.device={},this.parse=[]}getName(){return"\u{1F6E5}\uFE0E\u2503\u5FEB\u770B\u89C6\u9891\u2503\u{1F6E5}\uFE0E"}getAppName(){return"\u5FEB\u770B\u89C6\u9891"}getJSName(){return"kuaikan"}getType(){return 3}async init(e){await super.init(e),this.danmuStaus=!0,await this.setDevice()}async request(e,n,l,r){let i=VV().valueOf().toString(),s=Af(32),a=He.enc.Hex.stringify(He.MD5("H58d2%gLbeingX*%D4Y8!C!!@G_"+i+"_"+s)).toString().toLowerCase(),u={"user-agent":l||this.device.ua};e.includes("baibaipei")&&(u["device-id"]=this.device.id,u.sign=a,u.time=i,u.md5=s,u.version="2.1.5",u["system-model"]=this.device.model,u["system-brand"]=this.device.brand,u["system-version"]=this.device.release,u.host="api1.baibaipei.com:8899"),r||(u["Content-Type"]="application/x-www-form-urlencoded");let o=await req(e,{method:r?"get":"post",headers:u,data:n||{},postType:"form"});await this.jadeLog.debug(`URL:${e},headers:${JSON.stringify(u)},data:${[JSON.stringify(n)]}`);let c=o.content;try{let f=He.enc.Utf8.parse("IjhHsCB2B5^#%0Ag"),m=He.enc.Utf8.parse("y8_m.3rauW/>j,}."),d=He.enc.Base64.parse(c),y=He.AES.decrypt({ciphertext:d},f,{iv:m,padding:He.pad.Pkcs7});return y=He.enc.Utf8.stringify(y),await this.jadeLog.debug(`response:${y}`),JSON.parse(y)}catch{return JSON.parse(c)}}async setDevice(){let e="device",n=await local.get(this.siteKey,e);if(n.length>0)try{this.device=JSON.parse(n)}catch{}B.isEmpty(this.device)&&(this.device=jxe(),this.device.id=Af(13).toLowerCase(),this.device.ua="okhttp/3.14.9",await local.set(this.siteKey,e,JSON.stringify(this.device)))}async setClasses(){await this.setDevice();let e=await this.request(this.siteUrl+"/api.php/Index/getTopVideoCategory");for(let n of e.data){let l=n.nav_name;if(l==="\u63A8\u8350")continue;let r=n.nav_type_id.toString();this.classes.push({type_id:r,type_name:l})}}async getFilter(e){await this.jadeLog.debug(JSON.stringify(e));let n=[];for(let l of Object.keys(e)){let r=e[l];l==="plot"&&(l="class");let i="";switch(l){case"class":i="\u7C7B\u578B";break;case"area":i="\u5730\u533A";break;case"lang":i="\u8BED\u8A00";break;case"year":i="\u5E74\u4EE3";break;case"sort":i="\u6392\u5E8F";break}if(i.length===0)continue;let s={key:l,name:i},a=[];for(let u=0;u<r.length;u++){let o=r[u],c=l==="sort"?u+"":o==="\u5168\u90E8"?"0":o;a.push({n:o,v:c})}s.init=l==="sort"?"1":a[0].v,s.value=a,n.push(s)}return n}async setFilterObj(){for(let e of this.classes){let n=e.type_id;if(n!=="\u6700\u8FD1\u66F4\u65B0"){let l=await this.request(this.siteUrl+"/api.php/Video/getFilterType",{type:n});this.filterObj[n]=await this.getFilter(l.data)}}}async parseVodShortListFromJSONByHome(e){let n=[];for(let l of e.video){let r=await this.parseVodShortListFromJson(l.list);n.push(...r)}return n}async parseVodShortListFromJson(e){let n=[];for(let l of e){let r=new Ne;r.vod_id=l.vod_id,r.vod_name=l.vod_name,r.vod_pic=l.vod_pic,r.vod_remarks=l.vod_remarks,n.push(r)}return n}async parseVodDetailfromJson(e){let n=new Me;n.load_dic(JSON.stringify(e)),n.vod_content=e.vod_content.trim(),n.type_name=e.vod_class;let l={};for(let s of e.vod_play){let a=s.playerForm;if(a==="jp"&&this.catOpenStatus||a==="xg"&&this.catOpenStatus)continue;let u=[];for(let o of s.url)u.push(Uxe(n.vod_name,o.title)+"$"+o.play_url);!l.hasOwnProperty(a)&&u.length>0&&(l[a]=u)}this.parse=e.parse||[],n.vod_play_from=B.keys(l).join("$$$");let r=B.values(l),i=[];for(let s of r)i.push(s.join("#"));return n.vod_play_url=i.join("$$$"),n}async setHomeVod(){let e=await this.request(this.siteUrl+"/api.php/Index/getHomePage",{p:"1",type:"1"});this.homeVodList=await this.parseVodShortListFromJSONByHome(e.data)}async setCategory(e,n,l,r){n===0&&(n=1);let i=this.siteUrl+"/api.php/Video/getFilterVideoList",s=JSON.parse(io(`{
|
||||
"type": "{{tid}}",
|
||||
"p": "{{pg}}",
|
||||
"area": "{{ext.area|default(0)}}",
|
||||
@@ -428,7 +428,7 @@ function print() { __p += __j.call(arguments, '') }
|
||||
`,""),B.isEmpty(l.vod_pic)&&(l.vod_pic=Zs+"/resources/dygang.jpg"),l}async parseVodShortListFromDoc(e){let n=[],l=e('[class="index-tj-l"]').find("li");for(let r of l){let i=e(r).find("a")[0],s=this.parseVodShortFromElement(e,i);n.push(s)}return n}async parseVodShortListFromDocByCategory(e){let n=[],l=e('[class="index-area clearfix"]').find("li");for(let r of l){let i=e(r).find("a")[0],s=this.parseVodShortFromElement(e,i);n.push(s)}return n}async parseVodDetailFromDoc(e){let n=new Me,l=e('[ class="ct mb clearfix"]');n.vod_pic=e(l).find("img")[0].attribs.src,n.vod_name=we(/◎片 名 (.*?)<br>/,e(l).html()),n.vod_area=we(/◎产 地 (.*?)<br>/,e(l).html()),n.vod_year=we(/◎年 代 (.*?)<br>/,e(l).html()),n.type_name=we(/◎类 别 (.*?)<br>/,e(l).html()),n.vod_remarks=we(/◎集 数 (.*?)<br>/,e(l).html());let r=we(/◎主 演 (.*?)<\/p>/s,e(l).html());B.isEmpty(r)&&(r=we(/◎演 员 (.*?)<\/p>/s,e(l).html()));let i=[];for(let f of r.split(`
|
||||
`))i.push(f.replaceAll("\u3000\u3000\u3000\u3000 \u3000","").replaceAll("<br>","").replaceAll("\u3000\u3000\u3000\u3000\u3000",""));n.vod_actor=i.join("/"),n.vod_director=we(/◎导 演 (.*?)<br>/,e(l).html()),n.vod_content=we(/◎简 介<\/p>(.*?)<br>/s,e(l).html()).replaceAll("<p>","").replaceAll(`
|
||||
`,""),B.isEmpty(n.vod_content)&&(n.vod_content=we(/◎简 介<br>(.*?)<\/p>/s,e(l).html()).replaceAll("<p>","").replaceAll(`
|
||||
`,""));let s=[],a=[],u=e('[class="playfrom tab8 clearfix"]'),o=e('[class="videourl clearfix"]');for(let f=0;f<u.length;f++){let m=u[f],d=e(e(m).find("li")).html();s.push(d.replaceAll('<i class="playerico ico-Azhan"></i> ',""));let y=[];for(let _ of e(o[f]).find("a")){let S=_.attribs.title,w=_.attribs.href;y.push(S+"$"+w)}a.push(y.join("#"))}let c=e(e(l).find("span")[0]).find("span");if(c.length>0){let f=e(c).html();s.push(we(/【(.*?)】/,f.replaceAll("\u4E0B\u8F7D\u5730\u5740","\u78C1\u529B\u94FE\u63A5")));let m=[];for(let d of e(e(e(l).find("tbody")).find("tr")).find("a")){let y=e(d).html().replaceAll(".mp4",""),_=d.attribs.href;m.push(y+"$"+_)}a.push(m.join("#"))}return n.vod_play_from=s.join("$$$"),n.vod_play_url=a.join("$$$"),n}async setHomeVod(){let e=await this.getHtml();this.homeVodList=await this.parseVodShortListFromDoc(e)}async setCategory(e,n,l,r){let i=this.siteUrl+e;r.\u6309\u7C7B\u578B!==void 0&&r.\u6309\u7C7B\u578B!=="0"&&(i=i+`${r.\u6309\u7C7B\u578B}/`),parseInt(n)>1&&(i=i+`index_${n}.html`);let s=await this.getHtml(i);this.vodList=await this.parseVodShortListFromDocByCategory(s)}async setDetail(e){let n=await this.getHtml(e);this.vodDetail=await this.parseVodDetailFromDoc(n)}async setSearch(e,n){let l=this.siteUrl+"/e/search/index.php",r={keyboard:e,submit:"\u641C \u7D22",show:"title,zhuyan",tempid:"1"},i=await this.post(l,r,this.getHeader()),s=Ue(i);this.vodList=await this.parseVodShortListFromDocByCategory(s)}async setPlay(e,n,l){if(n.indexOf("http")>-1){let r=await this.getHtml(n),i=we(/url: '(.*?)',/,r.html());if(B.isEmpty(i)){let s=r(r('[class="video"]')[0]).find("iframe")[0].attribs.src,a=await this.fetch(s,null,{"User-Agent":Gl});if(this.playUrl=we(/url: '(.*?)',/,a),B.isEmpty(this.playUrl)){let u=eq(s);this.playUrl=u+we(/var main = "(.*?)";/,a)}}else this.playUrl=i}else this.playUrl=n}},Un=new JS;var KS=class extends Ce{constructor(){super()}getName(){return Un.getName()}getAppName(){return Un.getAppName()}getJSName(){return Un.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await Un.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await Un.initCookie(e.server.config.bilicookie),await Un.spiderInit(e),Un.cfgObj.code=0,Un.catOpenStatus=!0,Un.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await Un.setClasses(),this.classes=Un.classes}async setFilterObj(){await Un.setFilterObj(),this.filterObj=Un.filterObj}async setHomeVod(){await Un.setHomeVod(),this.homeVodList=Un.homeVodList}async setCategory(e,n,l,r){await Un.setCategory(e,n,l,r),this.vodList=Un.vodList}async setDetail(e){await Un.setDetail(e),this.vodDetail=Un.vodDetail}async setPlay(e,n,l){await Un.setPlay(e,n,l),this.playUrl=Un.playUrl,this.result=Un.result}async setSearch(e,n,l){await Un.setSearch(e,n,l),this.vodList=Un.vodList,this.result=Un.result}async setProxy(e,n){return await Un.proxy(e,n)}},ja=new KS;async function RY(t,e){return await ja.init(t,e)}async function IY(t,e){return await ja.home(t,e)}async function $Ae(t,e){return await ja.homeVod(t,e)}async function kY(t,e){return await ja.category(t,e)}async function DY(t,e){return await ja.detail(t,e)}async function PY(t,e){return await ja.play(t,e)}async function LY(t,e){return await ja.search(t,e)}async function BAe(t,e){return await ja.proxy(t,e)}var FY={meta:{key:Un.getJSName(),name:Un.getName(),type:Un.getType()},api:async t=>{t.post("/init",RY),t.post("/home",IY),t.post("/category",kY),t.post("/detail",DY),t.post("/play",PY),t.post("/search",LY),t.get("/proxy/:what/:ids/:end",BAe)},spider:{init:RY,home:IY,homeVod:$Ae,category:kY,detail:DY,play:PY,search:LY}};var XS=class extends Pe{constructor(){super(),this.siteUrl="https://tvfan.xxooo.cf",this.woggTypeObj={\u73A9\u5076\u7535\u5F71:"\u7535\u5F71",\u73A9\u5076\u5267\u96C6:"\u7535\u89C6\u5267"}}async init(e){await super.init(e),await z2(this.cfgObj.token),this.danmuStaus=!0}getName(){return"\u{1F482}\u200D\u2503\u963F\u91CC\u73A9\u5076\u2503\u{1F482}"}getAppName(){return"\u963F\u91CC\u73A9\u5076"}getJSName(){return"wogg"}getType(){return 3}async parseVodShortListFromDoc(e){let n=e(".module-item"),l=[];for(let r of n){let i=new Ne,s=e(r).find(".module-item-cover .module-item-pic a").first();i.vod_id=s.attr("href"),i.vod_name=s.attr("title"),i.vod_pic=e(r).find(".module-item-cover .module-item-pic img").first().attr("data-src"),i.vod_pic.indexOf("img.php?url=")>0&&(i.vod_pic=i.vod_pic.split("img.php?url=")[1]),i.vod_remarks=e(r).find(".module-item-text").first().text(),l.push(i)}return l}async parseVodDetailFromDoc(e){let n=new Me;n.vod_name=e(".page-title")[0].children[0].data,n.vod_pic=e(e(".mobile-play")).find(".lazyload")[0].attribs["data-src"],n.type_name=this.woggTypeObj[e('[class="video-info-aux"]').find("a")[0].attribs.title];let l=e(".video-info-items");n.vod_director=e(l[0]).find("a")[0].children[0].data;let r=e(l[1]).find("a"),i=[];for(let u of r)u.children.length>0&&i.push(u.children[0].data);n.vod_actor=i.join(" * "),n.vod_year=e(l[2]).find("a")[0].children[0].data,n.vod_remarks=`${e(l[3]).find("div")[0].children[0].data}, \u5236\u4F5C\u4EBA:Jade`,n.vod_content=e(l[4]).find("p")[0].children[0].data,n.vod_content=n.vod_content.replace("[\u6536\u8D77\u90E8\u5206]","").replace("[\u5C55\u5F00\u5168\u90E8]","");let s=[],a=e(".module-row-info");for(let u of a){let c=e(u).find("p")[0].children[0].data.match(so);B.isEmpty(c)||s.push(c[1])}if(s.length>0){let u=await x3(s,n.type_name);n.vod_play_url=u.vod_play_url,n.vod_play_from=u.vod_play_from}else await this.jadeLog.warning("\u83B7\u53D6\u8BE6\u60C5\u754C\u9762\u5931\u8D25,\u5931\u8D25\u539F\u56E0\u4E3A:\u6CA1\u6709\u5206\u4EAB\u94FE\u63A5");return n}async parseVodShortListFromDocBySearch(e){let n=e(".module-search-item"),l=[];for(let r of n){let i=new Ne;i.vod_id=e(r).find(".video-serial")[0].attribs.href,i.vod_name=e(r).find(".video-serial")[0].attribs.title,i.vod_pic=e(r).find(".module-item-pic > img")[0].attribs["data-src"],i.vod_remarks="",l.push(i)}return l}get_extend_sort_dic(e){let n={};return e<4?n={1:3,2:1,3:4,4:11,5:5,6:2}:e===4?n={1:1,2:11,3:5,4:2}:e===6?n={1:3,2:1,3:11,4:5,5:2}:e===5&&(n={1:5,2:2}),n}async setClasses(){let e=await this.fetch(this.siteUrl,null,this.getHeader());if(!B.isEmpty(e)){let l=Ue(e)(".nav-link");for(let r of l){let i=parseInt(r.attribs.href.split("/").slice(-1)[0].split(".html")[0]),s=r.children.slice(-1)[0].data.replace(`
|
||||
`,""));let s=[],a=[],u=e('[class="playfrom tab8 clearfix"]'),o=e('[class="videourl clearfix"]');for(let f=0;f<u.length;f++){let m=u[f],d=e(e(m).find("li")).html();s.push(d.replaceAll('<i class="playerico ico-Azhan"></i> ',""));let y=[];for(let _ of e(o[f]).find("a")){let S=_.attribs.title,w=_.attribs.href;y.push(S+"$"+w)}a.push(y.join("#"))}let c=e(e(l).find("span")[0]).find("span");if(c.length>0){let f=e(c).html();s.push(we(/【(.*?)】/,f.replaceAll("\u4E0B\u8F7D\u5730\u5740","\u78C1\u529B\u94FE\u63A5")));let m=[];for(let d of e(e(e(l).find("tbody")).find("tr")).find("a")){let y=e(d).html().replaceAll(".mp4",""),_=d.attribs.href;m.push(y+"$"+_)}a.push(m.join("#"))}return n.vod_play_from=s.join("$$$"),n.vod_play_url=a.join("$$$"),n}async setHomeVod(){let e=await this.getHtml();this.homeVodList=await this.parseVodShortListFromDoc(e)}async setCategory(e,n,l,r){let i=this.siteUrl+e;r.\u6309\u7C7B\u578B!==void 0&&r.\u6309\u7C7B\u578B!=="0"&&(i=i+`${r.\u6309\u7C7B\u578B}/`),parseInt(n)>1&&(i=i+`index_${n}.html`);let s=await this.getHtml(i);this.vodList=await this.parseVodShortListFromDocByCategory(s)}async setDetail(e){let n=await this.getHtml(e);this.vodDetail=await this.parseVodDetailFromDoc(n)}async setSearch(e,n){let l=this.siteUrl+"/e/search/index.php",r={keyboard:e,submit:"\u641C \u7D22",show:"title,zhuyan",tempid:"1"},i=await this.post(l,r,this.getHeader()),s=Ue(i);this.vodList=await this.parseVodShortListFromDocByCategory(s)}async setPlay(e,n,l){if(n.indexOf("http")>-1){let r=await this.getHtml(n),i=we(/url: '(.*?)',/,r.html());if(B.isEmpty(i)){let s=r(r('[class="video"]')[0]).find("iframe")[0].attribs.src,a=await this.fetch(s,null,{"User-Agent":Gl});if(this.playUrl=we(/url: '(.*?)',/,a),B.isEmpty(this.playUrl)){let u=eq(s);this.playUrl=u+we(/var main = "(.*?)";/,a)}}else this.playUrl=i}else this.playUrl=n}},Un=new JS;var KS=class extends Ce{constructor(){super()}getName(){return Un.getName()}getAppName(){return Un.getAppName()}getJSName(){return Un.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await Un.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await Un.initCookie(e.server.config.bilicookie),await Un.spiderInit(e),Un.cfgObj.code=0,Un.catOpenStatus=!0,Un.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await Un.setClasses(),this.classes=Un.classes}async setFilterObj(){await Un.setFilterObj(),this.filterObj=Un.filterObj}async setHomeVod(){await Un.setHomeVod(),this.homeVodList=Un.homeVodList}async setCategory(e,n,l,r){await Un.setCategory(e,n,l,r),this.vodList=Un.vodList}async setDetail(e){await Un.setDetail(e),this.vodDetail=Un.vodDetail}async setPlay(e,n,l){await Un.setPlay(e,n,l),this.playUrl=Un.playUrl,this.result=Un.result}async setSearch(e,n,l){await Un.setSearch(e,n,l),this.vodList=Un.vodList,this.result=Un.result}async setProxy(e,n){return await Un.proxy(e,n)}},ja=new KS;async function RY(t,e){return await ja.init(t,e)}async function IY(t,e){return await ja.home(t,e)}async function $Ae(t,e){return await ja.homeVod(t,e)}async function kY(t,e){return await ja.category(t,e)}async function DY(t,e){return await ja.detail(t,e)}async function PY(t,e){return await ja.play(t,e)}async function LY(t,e){return await ja.search(t,e)}async function BAe(t,e){return await ja.proxy(t,e)}var FY={meta:{key:Un.getJSName(),name:Un.getName(),type:Un.getType()},api:async t=>{t.post("/init",RY),t.post("/home",IY),t.post("/category",kY),t.post("/detail",DY),t.post("/play",PY),t.post("/search",LY),t.get("/proxy/:what/:ids/:end",BAe)},spider:{init:RY,home:IY,homeVod:$Ae,category:kY,detail:DY,play:PY,search:LY}};var XS=class extends Pe{constructor(){super(),this.siteUrl="https://www.wogg.xyz",this.woggTypeObj={\u73A9\u5076\u7535\u5F71:"\u7535\u5F71",\u73A9\u5076\u5267\u96C6:"\u7535\u89C6\u5267"}}async init(e){await super.init(e),await z2(this.cfgObj.token),this.danmuStaus=!0}getName(){return"\u{1F482}\u200D\u2503\u963F\u91CC\u73A9\u5076\u2503\u{1F482}"}getAppName(){return"\u963F\u91CC\u73A9\u5076"}getJSName(){return"wogg"}getType(){return 3}async parseVodShortListFromDoc(e){let n=e(".module-item"),l=[];for(let r of n){let i=new Ne,s=e(r).find(".module-item-cover .module-item-pic a").first();i.vod_id=s.attr("href"),i.vod_name=s.attr("title"),i.vod_pic=e(r).find(".module-item-cover .module-item-pic img").first().attr("data-src"),i.vod_pic.indexOf("img.php?url=")>0&&(i.vod_pic=i.vod_pic.split("img.php?url=")[1]),i.vod_remarks=e(r).find(".module-item-text").first().text(),l.push(i)}return l}async parseVodDetailFromDoc(e){let n=new Me;n.vod_name=e(".page-title")[0].children[0].data,n.vod_pic=e(e(".mobile-play")).find(".lazyload")[0].attribs["data-src"],n.type_name=this.woggTypeObj[e('[class="video-info-aux"]').find("a")[0].attribs.title];let l=e(".video-info-items");n.vod_director=e(l[0]).find("a")[0].children[0].data;let r=e(l[1]).find("a"),i=[];for(let u of r)u.children.length>0&&i.push(u.children[0].data);n.vod_actor=i.join(" * "),n.vod_year=e(l[2]).find("a")[0].children[0].data,n.vod_remarks=`${e(l[3]).find("div")[0].children[0].data}, \u5236\u4F5C\u4EBA:Jade`,n.vod_content=e(l[4]).find("p")[0].children[0].data,n.vod_content=n.vod_content.replace("[\u6536\u8D77\u90E8\u5206]","").replace("[\u5C55\u5F00\u5168\u90E8]","");let s=[],a=e(".module-row-info");for(let u of a){let c=e(u).find("p")[0].children[0].data.match(so);B.isEmpty(c)||s.push(c[1])}if(s.length>0){let u=await x3(s,n.type_name);n.vod_play_url=u.vod_play_url,n.vod_play_from=u.vod_play_from}else await this.jadeLog.warning("\u83B7\u53D6\u8BE6\u60C5\u754C\u9762\u5931\u8D25,\u5931\u8D25\u539F\u56E0\u4E3A:\u6CA1\u6709\u5206\u4EAB\u94FE\u63A5");return n}async parseVodShortListFromDocBySearch(e){let n=e(".module-search-item"),l=[];for(let r of n){let i=new Ne;i.vod_id=e(r).find(".video-serial")[0].attribs.href,i.vod_name=e(r).find(".video-serial")[0].attribs.title,i.vod_pic=e(r).find(".module-item-pic > img")[0].attribs["data-src"],i.vod_remarks="",l.push(i)}return l}get_extend_sort_dic(e){let n={};return e<4?n={1:3,2:1,3:4,4:11,5:5,6:2}:e===4?n={1:1,2:11,3:5,4:2}:e===6?n={1:3,2:1,3:11,4:5,5:2}:e===5&&(n={1:5,2:2}),n}async setClasses(){let e=await this.fetch(this.siteUrl,null,this.getHeader());if(!B.isEmpty(e)){let l=Ue(e)(".nav-link");for(let r of l){let i=parseInt(r.attribs.href.split("/").slice(-1)[0].split(".html")[0]),s=r.children.slice(-1)[0].data.replace(`
|
||||
`,"").replace(" ","").replace("\u73A9\u5076",""),a={type_id:i,type_name:s};this.classes.push(a)}}}async getFilter(e){let n=e("[class='scroll-content']").slice(1),l=[];for(let r=0;r<n.length;r++){let i={key:(r+1).toString(),name:"",value:[]};if(r<n.length-1){i.name=e(e(n[r]).find("a")[0]).text(),i.value.push({n:"\u5168\u90E8",v:"0"});for(let s of e(n[r]).find("a").slice(1))i.value.push({n:e(s).text(),v:e(s).text()});l.push(i)}else i.name=e(e(n[r]).find("a")[0]).text(),i.value=[{n:"\u5168\u90E8",v:"0"},{n:e(e(n[r]).find("a")[1]).text(),v:"hits"},{n:e(e(n[r]).find("a")[2]).text(),v:"score"}],l.push(i)}return l}async setFilterObj(){for(let e of this.classes){let n=e.type_id;if(n!=="/"&&n!=="\u6700\u8FD1\u66F4\u65B0"){let l=this.siteUrl+`/index.php/vodshow/${n}--------1---.html`,r=await this.fetch(l,null,this.getHeader());if(r!=null){let i=Ue(r);this.filterObj[n]=await this.getFilter(i)}}}}async setHomeVod(){let e=await this.fetch(this.siteUrl,null,this.getHeader());if(!B.isEmpty(e)){let n=Ue(e);this.homeVodList=await this.parseVodShortListFromDoc(n)}}async setCategory(e,n,l,r){let i=[e.toString(),"","","","","","","",n.toString(),"","",""],s=this.get_extend_sort_dic(parseInt(e));for(let o of Object.keys(s))r[o]==="0"?i[s[o]]="":i[s[o]]=r[o];let a=this.siteUrl+"/index.php/vodshow/"+i.join("-")+".html",u=await this.fetch(a,null,this.getHeader());if(!B.isEmpty(u)){let o=Ue(u);this.vodList=await this.parseVodShortListFromDoc(o);let c=we(/\$\("\.mac_total"\)\.text\('(\d+)'\)/,u);this.limit=72,c.length>0&&(this.total=parseInt(c)),this.total<=this.limit?this.count=1:this.count=Math.ceil(this.total/this.limit)}}async setDetail(e){let n=this.siteUrl+e,l=await this.fetch(n,null,this.getHeader());if(!B.isEmpty(l)){let r=Ue(l);this.vodDetail=await this.parseVodDetailFromDoc(r)}}async setPlay(e,n,l){let r=await A3(e,n,l);this.playUrl=JSON.parse(r).url}async setSearch(e,n){let l=this.siteUrl+"/index.php/vodsearch/-------------.html?wd="+e,r=await this.fetch(l,null,this.getHeader());if(!B.isEmpty(r)){let i=Ue(r);this.vodList=await this.parseVodShortListFromDocBySearch(i)}}},Mn=new XS;var WS=class extends Ce{constructor(){super()}getName(){return Mn.getName()}getAppName(){return Mn.getAppName()}getJSName(){return Mn.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await Mn.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await Mn.initCookie(e.server.config.bilicookie),await Mn.spiderInit(e),Mn.cfgObj.code=0,Mn.catOpenStatus=!0,Mn.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await Mn.setClasses(),this.classes=Mn.classes}async setFilterObj(){await Mn.setFilterObj(),this.filterObj=Mn.filterObj}async setHomeVod(){await Mn.setHomeVod(),this.homeVodList=Mn.homeVodList}async setCategory(e,n,l,r){await Mn.setCategory(e,n,l,r),this.vodList=Mn.vodList}async setDetail(e){await Mn.setDetail(e),this.vodDetail=Mn.vodDetail}async setPlay(e,n,l){await Mn.setPlay(e,n,l),this.playUrl=Mn.playUrl,this.result=Mn.result}async setSearch(e,n,l){await Mn.setSearch(e,n,l),this.vodList=Mn.vodList,this.result=Mn.result}async setProxy(e,n){return await Mn.proxy(e,n)}},Ua=new WS;async function jY(t,e){return await Ua.init(t,e)}async function UY(t,e){return await Ua.home(t,e)}async function HAe(t,e){return await Ua.homeVod(t,e)}async function MY(t,e){return await Ua.category(t,e)}async function $Y(t,e){return await Ua.detail(t,e)}async function BY(t,e){return await Ua.play(t,e)}async function HY(t,e){return await Ua.search(t,e)}async function VAe(t,e){return await Ua.proxy(t,e)}var VY={meta:{key:Mn.getJSName(),name:Mn.getName(),type:Mn.getType()},api:async t=>{t.post("/init",jY),t.post("/home",UY),t.post("/category",MY),t.post("/detail",$Y),t.post("/play",BY),t.post("/search",HY),t.get("/proxy/:what/:ids/:end",VAe)},spider:{init:jY,home:UY,homeVod:HAe,category:MY,detail:$Y,play:BY,search:HY}};var YS=class extends Pe{constructor(){super(),this.siteUrl="https://www.pansearch.me/"}getName(){return"\u{1F5C2}\uFE0F\u2503\u963F\u91CC\u76D8\u641C\u2503\u{1F5C2}\uFE0F"}getAppName(){return"\u963F\u91CC\u76D8\u641C"}getJSName(){return"pan_search"}getType(){return 3}getSearchHeader(){let e=this.getHeader();return e["x-nextjs-data"]="1",e}async init(e){await super.init(e),await z2(this.cfgObj.token)}async parseVodDetailfromJson(e){let n=JSON.parse(e),l=new Me,r=n.content.split(`
|
||||
`);l.vod_name=r[0].replaceAll(/<\\?[^>]+>/g,"").replace("\u540D\u79F0\uFF1A","");let i=new Date(n.time);l.vod_remarks=i.toLocaleDateString().replace(/\//g,"-")+" "+i.toTimeString().substr(0,8),l.vod_pic=n.image;let s="";for(let a of r)a.indexOf("\u63CF\u8FF0")>-1&&(l.vod_content=a.replace("\u63CF\u8FF0\uFF1A","").replaceAll(/<\\?[^>]+>/g,"")),a.indexOf("\u6807\u7B7E\uFF1A")>-1&&(l.type_name=a.replace("\u{1F3F7} \u6807\u7B7E\uFF1A","")),a.indexOf("\u94FE\u63A5\uFF1A")>-1&&(s=a.replaceAll(/<\\?[^>]+>/g,"").replace("\u94FE\u63A5\uFF1A",""));try{let a=await x3([s]);l.vod_play_url=a.vod_play_url,l.vod_play_from=a.vod_play_from}catch(a){await this.jadeLog.error(`\u83B7\u53D6\u963F\u91CC\u89C6\u9891\u64AD\u653E\u5931\u8D25,\u5931\u8D25\u539F\u56E0\u4E3A:${a}`)}return l}async parseVodShortListFromDocBySearch(e,n){let l=[],r=JSON.parse(e("script[id=__NEXT_DATA__]")[0].children[0].data).buildId,i=this.siteUrl+"_next/data/"+r+"/search.json?keyword="+encodeURIComponent(n)+"&pan=aliyundrive",s=await this.fetch(i,null,this.getSearchHeader());if(B.isEmpty(s))await this.jadeLog.error("\u641C\u7D22\u9875\u9762\u89E3\u6790\u5931\u8D25",!0);else{let a=JSON.parse(s).pageProps.data.data;for(let u of a){let o=new Ne;o.vod_id=JSON.stringify(u);let c=u.content.split(`
|
||||
`);o.vod_name=c[0].replaceAll(/<\\?[^>]+>/g,"").replace("\u540D\u79F0\uFF1A","");let f=new Date(u.time);o.vod_remarks=f.toLocaleDateString().replace(/\//g,"-")+" "+f.toTimeString().substr(0,8),o.vod_pic=u.image,l.push(o)}return l}}async setDetail(e){this.vodDetail=await this.parseVodDetailfromJson(e)}async setSearch(e,n){let l=await this.fetch(this.siteUrl,null,this.getHeader());if(!B.isEmpty(l)){let r=Ue(l);this.vodList=await this.parseVodShortListFromDocBySearch(r,e)}}async play(e,n,l){return await A3(e,n,l)}},$n=new YS;var QS=class extends Ce{constructor(){super()}getName(){return $n.getName()}getAppName(){return $n.getAppName()}getJSName(){return $n.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await $n.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await $n.initCookie(e.server.config.bilicookie),await $n.spiderInit(e),$n.cfgObj.code=0,$n.catOpenStatus=!0,$n.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await $n.setClasses(),this.classes=$n.classes}async setFilterObj(){await $n.setFilterObj(),this.filterObj=$n.filterObj}async setHomeVod(){await $n.setHomeVod(),this.homeVodList=$n.homeVodList}async setCategory(e,n,l,r){await $n.setCategory(e,n,l,r),this.vodList=$n.vodList}async setDetail(e){await $n.setDetail(e),this.vodDetail=$n.vodDetail}async setPlay(e,n,l){await $n.setPlay(e,n,l),this.playUrl=$n.playUrl,this.result=$n.result}async setSearch(e,n,l){await $n.setSearch(e,n,l),this.vodList=$n.vodList,this.result=$n.result}async setProxy(e,n){return await $n.proxy(e,n)}},Ma=new QS;async function qY(t,e){return await Ma.init(t,e)}async function zY(t,e){return await Ma.home(t,e)}async function qAe(t,e){return await Ma.homeVod(t,e)}async function GY(t,e){return await Ma.category(t,e)}async function JY(t,e){return await Ma.detail(t,e)}async function KY(t,e){return await Ma.play(t,e)}async function XY(t,e){return await Ma.search(t,e)}async function zAe(t,e){return await Ma.proxy(t,e)}var WY={meta:{key:$n.getJSName(),name:$n.getName(),type:$n.getType()},api:async t=>{t.post("/init",qY),t.post("/home",zY),t.post("/category",GY),t.post("/detail",JY),t.post("/play",KY),t.post("/search",XY),t.get("/proxy/:what/:ids/:end",zAe)},spider:{init:qY,home:zY,homeVod:qAe,category:GY,detail:JY,play:KY,search:XY}};var GAe=["4k","4K"],ZS=class extends Pe{constructor(){super(),this.siteUrl="https://www.alypw.com"}async init(e){await super.init(e),await z2(this.cfgObj.token)}getName(){return"\u{1F94F}\u200D\u2503\u963F\u91CC\u4E91\u76D8\u5206\u4EAB\u2503\u{1F94F}\u200D"}getAppName(){return"\u963F\u91CC\u4E91\u76D8\u5206\u4EAB"}getJSName(){return"aliyunpanshare"}getType(){return 3}getRemarks(e,n){if(B.isEmpty(e)){for(let l of GAe)if(n.indexOf(l)>-1)return l}else return e}parseVodName(e){let n=we(/\[阿里云盘](.*?) /,e);return e.indexOf("\u5408\u96C6")>-1||(B.isEmpty(n)&&(n=we(/\[阿里云盘](.*?)(/,e)),n.indexOf("[")>-1&&(n=n.split("[")[0]),n.indexOf("\u3010")>-1&&(n=n.split("\u3010")[0]),n==="4K")?"":n}async parseVodShortListFromDoc(e){let n=[],l=e(e('[class="hometab"]').find('[class="box"]')).find("li");for(let r of l){let i=e(r).find('[class="imgr"]')[0],s=new Ne;s.vod_id=e(i).find("a")[0].attribs.href;let a=e(i).find("a")[0].attribs.title;s.vod_name=this.parseVodName(a),s.vod_pic=e(r).find("img")[0].attribs.src,s.vod_remarks=this.getRemarks(we(/【(.*?)】/,a),a),n.push(s)}return n}async parseVodShortListFromDocByCategory(e){let n=[],l=e('[class="main container"]'),r=e(e(l).find('[class="list"]')).find("li");r.length===0&&(r=e(l).find("li"));for(let i of r){let s=e(i).find("img")[0].attribs.alt.replaceAll("<strong>","").replaceAll("</strong>",""),a=new Ne;a.vod_id=e(i).find("a")[0].attribs.href,a.vod_name=this.parseVodName(s),a.vod_pic=e(i).find("img")[0].attribs.src,a.vod_remarks=this.getRemarks(we(/【(.*?)】/,s),s),B.isEmpty(a.vod_name)||n.push(a)}return n}async parseVodDetailFromDoc(e){let n=e('[class="mainl"]'),l=e(e(n).find('[class="title"]')[0]).text(),r=new Me;r.vod_name=we(/\[阿里云盘](.*?) /,l),r.vod_remarks=this.getRemarks(we(/【(.*?)】/,l),l);let i=e(n).find('[class="article_content"]');r.vod_pic=e(i).find("p>img")[0].attribs.src;let s=e(i).find("p"),a="";for(let f of s)a=a+e(f).text()+`
|
||||
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
880995fd4c5d4db2a34315a562333cf8
|
||||
4c0357154fb6018c7a01bd8623f71eb3
|
||||
@@ -485,7 +485,7 @@
|
||||
{
|
||||
"name": "live",
|
||||
"type": 0,
|
||||
"url": "https://agit.ai/fantaiying/0/raw/branch/main/tvlive.txt",
|
||||
"url": "https://gh.con.sh/https://github.com/jadehh/LiveSpider/blob/main/live/live.txt",
|
||||
"playerType": 1,
|
||||
"ua": "okhttp/3.15",
|
||||
"epg": "http://epg.112114.xyz/?ch={name}&date={date}",
|
||||
|
||||
+37
-18
@@ -10,11 +10,13 @@ import {Spider} from "./spider.js";
|
||||
import {_} from "../lib/cat.js";
|
||||
import * as Utils from "../lib/utils.js";
|
||||
import {VodDetail, VodShort} from "../lib/vod.js";
|
||||
|
||||
class CNTVSpider extends Spider {
|
||||
constructor() {
|
||||
super();
|
||||
this.siteUrl = "https://tv.cctv.com/m/index.shtml"
|
||||
this.apiUrl = "https://api.app.cctv.com"
|
||||
this.liveJsonUrl = "https://gh.con.sh/https://github.com/jadehh/LiveSpider/blob/main/json/live.json"
|
||||
|
||||
}
|
||||
|
||||
@@ -34,6 +36,15 @@ class CNTVSpider extends Spider {
|
||||
return 3
|
||||
}
|
||||
|
||||
async spiderInit() {
|
||||
await super.spiderInit();
|
||||
this.liveJson = JSON.parse(await this.fetch(this.liveJsonUrl, null, null))
|
||||
}
|
||||
|
||||
async init(cfg) {
|
||||
await super.init(cfg);
|
||||
await this.spiderInit()
|
||||
}
|
||||
|
||||
async getFilterByLive(dataList) {
|
||||
let extend_list = []
|
||||
@@ -47,10 +58,10 @@ class CNTVSpider extends Spider {
|
||||
return extend_list
|
||||
}
|
||||
|
||||
arrayIsinclude(str,items){
|
||||
arrayIsinclude(str, items) {
|
||||
let isInclude = false
|
||||
for (const data of items){
|
||||
if (str === data["title"]){
|
||||
for (const data of items) {
|
||||
if (str === data["title"]) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
@@ -64,12 +75,12 @@ class CNTVSpider extends Spider {
|
||||
let extend_dic = {"key": data["classname"], "name": data["title"], "value": []}
|
||||
for (const extendData of data["items"]) {
|
||||
if (data["classname"] === "nianfen") {
|
||||
if (!this.arrayIsinclude("2024",data["items"]) && extendData["title"] !== "全部" && !add_year_status) {
|
||||
if (!this.arrayIsinclude("2024", data["items"]) && extendData["title"] !== "全部" && !add_year_status) {
|
||||
extend_dic["value"].push({"n": "2024", "v": "2024"})
|
||||
add_year_status = true
|
||||
}
|
||||
}
|
||||
extend_dic["value"].push({"n": extendData["title"], "v":extendData["title"]})
|
||||
extend_dic["value"].push({"n": extendData["title"], "v": extendData["title"]})
|
||||
}
|
||||
extend_list.push(extend_dic)
|
||||
}
|
||||
@@ -150,15 +161,23 @@ class CNTVSpider extends Spider {
|
||||
let liveResponse = await req(liveApiUrl, {"headers": this.getHeader()})
|
||||
let liveJson = JSON.parse(liveResponse["content"])
|
||||
let playList = {}
|
||||
playList["直播"] = ["点击播放$" + liveJson["hls_url"]["hls2"]]
|
||||
let channelName = obj["channelName"].split(" ")[0].replaceAll("-", "").toLowerCase()
|
||||
let liveUrl = this.liveJson[channelName] ?? liveJson["hls_url"]["hls2"]
|
||||
playList["直播"] = ["点击播放$" + liveUrl]
|
||||
await this.jadeLog.info(`liveJson:${JSON.stringify(liveJson)}`)
|
||||
let vod_items = []
|
||||
for (const data of obj["program"]) {
|
||||
let episodeName = data["showTime"] + "-" + data["t"]
|
||||
let episodeUrl = liveJson["hls_url"]["hls1"] + `?begintimeabs=${data["st"] * 1000}&endtimeabs=${data["et"] * 1000}`
|
||||
vod_items.push(episodeName + "$" + episodeUrl)
|
||||
if (this.liveJson[channelName] !== undefined) {
|
||||
|
||||
} else {
|
||||
for (const data of obj["program"]) {
|
||||
let episodeName = data["showTime"] + "-" + data["t"]
|
||||
let episodeUrl = liveUrl + `?begintimeabs=${data["st"] * 1000}&endtimeabs=${data["et"] * 1000}`
|
||||
vod_items.push(episodeName + "$" + episodeUrl)
|
||||
}
|
||||
}
|
||||
if (vod_items.length > 0){
|
||||
playList["点播"] = vod_items.join("#")
|
||||
}
|
||||
playList["点播"] = vod_items.join("#")
|
||||
return playList
|
||||
}
|
||||
|
||||
@@ -233,11 +252,11 @@ class CNTVSpider extends Spider {
|
||||
this.homeVodList = await this.parseVodShortListFromJson(resJson["data"]["templates"])
|
||||
}
|
||||
|
||||
getExtendValue(extend,key){
|
||||
if (extend[key] !== undefined && extend[key] !== "全部"){
|
||||
getExtendValue(extend, key) {
|
||||
if (extend[key] !== undefined && extend[key] !== "全部") {
|
||||
return extend[key]
|
||||
}
|
||||
return ""
|
||||
return ""
|
||||
}
|
||||
|
||||
async setCategory(tid, pg, filter, extend) {
|
||||
@@ -247,10 +266,10 @@ class CNTVSpider extends Spider {
|
||||
let response = JSON.parse(await this.fetch(url, null, this.getHeader()))
|
||||
this.vodList = this.parseVodShortByJson(response["data"]["templates"][0]["items"])
|
||||
} else {
|
||||
let letter = this.getExtendValue(extend,"zimu")
|
||||
let area = this.getExtendValue(extend,"diqu")
|
||||
let type = this.getExtendValue(extend,"leixing")
|
||||
let year = this.getExtendValue(extend,"nianfen")
|
||||
let letter = this.getExtendValue(extend, "zimu")
|
||||
let area = this.getExtendValue(extend, "diqu")
|
||||
let type = this.getExtendValue(extend, "leixing")
|
||||
let year = this.getExtendValue(extend, "nianfen")
|
||||
const limit = 12
|
||||
let url = "https://api.cntv.cn" + `/newVideoset/getCboxVideoAlbumList`
|
||||
let params = {
|
||||
|
||||
+12
-25
@@ -1,4 +1,4 @@
|
||||
import {__jsEvalReturn} from './lovemovie18.js';
|
||||
import {__jsEvalReturn} from './cntv.js';
|
||||
|
||||
import * as Utils from "../lib/utils.js";
|
||||
|
||||
@@ -51,49 +51,36 @@ async function testMusicPlay(vodDetail) {
|
||||
}
|
||||
|
||||
async function test() {
|
||||
let siteKey = 'lovemovie18';
|
||||
let siteKey = 'cntv';
|
||||
let siteType = 3;
|
||||
await spider.init({
|
||||
skey: siteKey, stype: siteType, ext: {
|
||||
"token": "6827db23e5474d02a07fd7431d3d5a5a",
|
||||
"box": "TV",
|
||||
"code": "1",
|
||||
"from": "lovemovie18",
|
||||
"from": "cntv",
|
||||
"danmu": true,
|
||||
"cookie": "buvid3=02675249-8ED3-C418-87F5-59E18316459714816infoc; b_nut=1704421014; _uuid=5D435F74-F574-D9AB-62C1-B9294DE465D913102infoc; buvid_fp=e8c5650c749398e9b5cad3f3ddb5081e; buvid4=007E85D1-52C1-7E6E-07CF-837FFBC9349516677-024010502-J5vTDSZDCw4fNnXRejbSVg%3D%3D; rpdid=|()kYJmulRu0J'u~|RRJl)JR; PVID=1; SESSDATA=3be091d3%2C1720332009%2C699ed%2A11CjAcCdwXG5kY1umhCOpQHOn_WP7L9xFBfWO7KKd4BPweodpR6VyIfeNyPiRmkr5jCqsSVjg0R0dZOVVHRUo3RnhPRTZFc3JPbGdiUjFCdHpiRDhiTkticmdKTjVyS1VhbDdvNjFMSDJlbUJydUlRdjFUNGFBNkJlV2ZTa0N1Q1BEVi1QYTQzTUh3IIEC; bili_jct=b0ee7b5d3f27df893545d811d95506d4; DedeUserID=78014638; DedeUserID__ckMd5=4c8c5d65065e468a; enable_web_push=DISABLE; header_theme_version=CLOSE; home_feed_column=5; CURRENT_BLACKGAP=0; CURRENT_FNVAL=4048; b_lsid=75E916AA_18EA1A8D995; bsource=search_baidu; FEED_LIVE_VERSION=V_HEADER_LIVE_NO_POP; browser_resolution=1507-691; bili_ticket=eyJhbGciOiJIUzI1NiIsImtpZCI6InMwMyIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3MTIzNjk5MTMsImlhdCI6MTcxMjExMDY1MywicGx0IjotMX0.8zQW_fNTCSBlK_JkHnzu3gDw62wuTK1qgKcbGec3swM; bili_ticket_expires=171236985"
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
let classes = JSON.parse(await spider.home(true));
|
||||
console.debug(JSON.stringify(classes))
|
||||
|
||||
// 测试详情
|
||||
let detail1 = JSON.parse(await spider.detail("/shechu/HODV21864binv1riSEXyoutiancaiyexiangqibing/"))
|
||||
await testPlay(detail1)
|
||||
|
||||
|
||||
// 测试搜索
|
||||
let search_page = JSON.parse(await spider.search("完美世界",false,1))
|
||||
console.debug(JSON.stringify(search_page))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// 测试分类
|
||||
let catePage = JSON.parse(await spider.category("/tvb/", "2", undefined, {"class":"/guochan/"}));
|
||||
console.debug(JSON.stringify(catePage));
|
||||
|
||||
//测试首页列表
|
||||
let homeVod = JSON.parse(await spider.homeVod())
|
||||
console.debug(JSON.stringify(homeVod));
|
||||
// 测试分类
|
||||
let catePage = JSON.parse(await spider.category("72", "2", undefined, {"live":"101"}));
|
||||
console.debug(JSON.stringify(catePage))
|
||||
|
||||
// 测试详情
|
||||
let detail1 = JSON.parse(await spider.detail("live-cctv2-https://app.cctv.com/special/appchannellogo/rectangle/l/cctv1.png?q=75"))
|
||||
await testPlay(detail1)
|
||||
|
||||
|
||||
|
||||
|
||||
// 测试搜索
|
||||
let search_page = JSON.parse(await spider.search("完美世界", false, 1))
|
||||
console.debug(JSON.stringify(search_page))
|
||||
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@ import {Spider} from "./spider.js";
|
||||
class WoggSpider extends Spider {
|
||||
constructor() {
|
||||
super();
|
||||
this.siteUrl = 'https://tvfan.xxooo.cf';
|
||||
this.siteUrl = 'https://www.wogg.xyz';
|
||||
this.woggTypeObj = {"玩偶电影":"电影","玩偶剧集":"电视剧"}
|
||||
}
|
||||
|
||||
|
||||
@@ -725,7 +725,7 @@
|
||||
{
|
||||
"name": "live",
|
||||
"type": 0,
|
||||
"url": "https://agit.ai/fantaiying/0/raw/branch/main/tvlive.txt",
|
||||
"url": "https://gh.con.sh/https://github.com/jadehh/LiveSpider/blob/main/live/live.txt",
|
||||
"playerType": 1,
|
||||
"ua": "okhttp/3.15",
|
||||
"epg": "http://epg.112114.xyz/?ch={name}&date={date}",
|
||||
|
||||
Reference in New Issue
Block a user