update CAT

This commit is contained in:
qist committed 2024-04-22 15:44:51 +08:00
1 parent 2ed4d980ae
commit 9a587a2158
3 files changed
+3 -3

No files matched your search

+1 -1
View File
@@ -408,7 +408,7 @@ function print() { __p += __j.call(arguments, '') }
"year": "{{ext.year|default(0)}}",
"sort": "{{ext.sort|default(0)}}",
"class": "{{ext.class|default(0)}}"}`,{ext:i,tid:e,pg:n}));console.log(s);let a=await this.request(l,s);this.vodList=await this.parseVodShortListFromJson(a.data.data)}async setDetail(e){let n=await this.request(this.siteUrl+"/api.php/Video/getVideoInfo",{video_id:e});this.vodDetail=await this.parseVodDetailfromJson(n.data.video)}async setPlay(e,n,r){this.result.jx=0;try{if(n.indexOf("youku")>=0||n.indexOf("iqiyi")>=0||n.indexOf("v.qq.com")>=0||n.indexOf("pptv")>=0||n.indexOf("le.com")>=0||n.indexOf("1905.com")>=0||n.indexOf("mgtv")>=0){if(this.parse.length>0)for(let i=0;i<this.parse.length;i++)try{let l=this.parse[i],s=await req(l+n,{headers:{"user-agent":"okhttp/4.1.0"}});await this.jadeLog.debug(`\u89E3\u6790\u8FDE\u63A5\u7ED3\u679C\u4E3A:${JSON.stringify(s)}`);let a=MX(n,JSON.parse(s.content).data);a.url&&(this.playUrl=a.url,this.danmuUrl=await this.danmuSpider.getVideoUrl(n,0),this.result.jx=1)}catch{}}else if(n.indexOf("jqq-")>=0){let i=await this.request(this.siteUrl+"/jqqheader.json",null,null,!0),l=n.split("-"),s=await req("https://api.juquanquanapp.com/app/drama/detail?dramaId="+l[1]+"&episodeSid="+l[2]+"&quality=LD",{headers:i}),a=JSON.parse(s.content);a.data.playInfo.url&&(this.playUrl=a.data.playInfo.url)}else if(n.startsWith("ftp"))this.playUrl=n;else{let i=await this.request(this.siteUrl+"/video.php",{url:n}),l=MX(n,i.data);l.url&&(l.url.indexOf("filename=1.mp4")>-1?this.playUrl=l.url:this.playUrl=await js2Proxy(!0,this.siteType,this.siteKey,"lzm3u8/"+ei(l.url),{}))}}catch(i){await this.jadeLog.error(i)}}async setSearch(e,n){let r=await this.request(this.siteUrl+"/api.php/Search/getSearch",{key:e,type_id:0,p:1});this.vodList=await this.parseVodShortListFromJson(r.data.data)}async proxy(e,n){let r=e[0],i=Hi(e[1]);if(r==="lzm3u8"){await this.jadeLog.debug(`\u4F7F\u7528\u4EE3\u7406\u64AD\u653E,\u64AD\u653E\u8FDE\u63A5\u4E3A:${i}`);let l=await req(i,{}),s=l.content,a=await js2Proxy(!1,this.siteType,this.siteKey,"lzm3u8/",{}),o=i.substr(0,i.lastIndexOf("/")+1);return await this.jadeLog.debug(s.length),s=s.replace(/#EXT-X-DISCONTINUITY\r*\n*#EXTINF:6.433333,[\s\S]*?#EXT-X-DISCONTINUITY/,""),await this.jadeLog.debug(s.length),s=s.replace(/(#EXT-X-KEY\S+URI=")(\S+)("\S+)/g,function(u,c,f,m){let d=(f.startsWith("http")?"":o)+f;return c+d+m}),s=s.replace(/(#EXT-X-STREAM-INF:.*\n)(.*)/g,function(u,c,f){let m=(f.startsWith("http")?"":o)+f;return c+a+Hi(m)}),s=s.replace(/(#EXTINF:.*\n)(.*)/g,function(u,c,f){let m=(f.startsWith("http")?"":o)+f;return c+m}),JSON.stringify({code:l.code,content:s,headers:l.headers})}return JSON.stringify({code:500,content:""})}},Tn=new pS;var fS=class extends Re{constructor(){super()}getName(){return Tn.getName()}getAppName(){return Tn.getAppName()}getJSName(){return Tn.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await Tn.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await Tn.initCookie(e.server.config.bilicookie),await Tn.spiderInit(e),Tn.cfgObj.code=0,Tn.catOpenStatus=!0,Tn.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await Tn.setClasses(),this.classes=Tn.classes}async setFilterObj(){await Tn.setFilterObj(),this.filterObj=Tn.filterObj}async setHomeVod(){await Tn.setHomeVod(),this.homeVodList=Tn.homeVodList}async setCategory(e,n,r,i){await Tn.setCategory(e,n,r,i),this.vodList=Tn.vodList}async setDetail(e){await Tn.setDetail(e),this.vodDetail=Tn.vodDetail}async setPlay(e,n,r){await Tn.setPlay(e,n,r),this.playUrl=Tn.playUrl,this.result=Tn.result}async setSearch(e,n,r){await Tn.setSearch(e,n,r),this.vodList=Tn.vodList,this.result=Tn.result}async setProxy(e,n){return await Tn.proxy(e,n)}},wo=new fS;async function $X(t,e){return await wo.init(t,e)}async function BX(t,e){return await wo.home(t,e)}async function tAe(t,e){return await wo.homeVod(t,e)}async function HX(t,e){return await wo.category(t,e)}async function VX(t,e){return await wo.detail(t,e)}async function qX(t,e){return await wo.play(t,e)}async function zX(t,e){return await wo.search(t,e)}async function nAe(t,e){return await wo.proxy(t,e)}var GX={meta:{key:Tn.getJSName(),name:Tn.getName(),type:Tn.getType()},api:async t=>{t.post("/init",$X),t.post("/home",BX),t.post("/category",HX),t.post("/detail",VX),t.post("/play",qX),t.post("/search",zX),t.get("/proxy/:what/:ids/:end",nAe)},spider:{init:$X,home:BX,homeVod:tAe,category:HX,detail:VX,play:qX,search:zX}};function rAe(t){return t==="zd"?"\u6700\u5927":t==="yj"?"\u6C38\u4E45":t==="hn"?"\u725B\u725B":t==="gs"?"\u5149\u6CE2":t==="sn"?"\u65B0\u6717":t==="wl"?"\u6DA1\u8F6E":t==="lz"?"\u826F\u5B50":t==="fs"?"F\u901F":t==="ff"?"\u98DE\u98DE":t==="bd"?"\u767E\u5EA6":t==="uk"?"\u9177U":t==="wj"?"\u65E0\u5929":t==="bj"?"\u516B\u6212":t==="tk"?"\u5929\u7A7A":t==="ss"?"\u901F\u901F":t==="kb"?"\u9177\u64AD":t==="sd"?"\u95EA\u7535":t==="xk"?"\u770B\u770B":t==="tp"?"\u6DD8\u6DD8" Line truncated
`,"").replaceAll("\u5267\u60C5\uFF1A",""),n.vod_pic=e("img.lazy")[0].attribs["data-original"],n}async parseVodShortListFromJson(e){let n=[];for(let r of e){let i=new Ne;i.vod_id=r.url,i.vod_pic=r.thumb,i.vod_remarks=r.time,i.vod_name=r.title,n.push(i)}return n}async setClasses(){let e=await this.fetch(this.siteUrl,null,this.getHeader());if(!B.isEmpty(e)){let n=Ge(e),r=n("[class=index-list-l]");for(let i of r){let l=n(n(i).find('[class="h1 clearfix"]')[0]).find("a"),s=l[0].attribs.href,a=n(l[1]).text();B.isEmpty(a)||this.classes.push({type_id:s,type_name:a})}}}async getFilter(e){let n=this.siteUrl+e,r=await this.fetch(n,null,this.getHeader()),i=[];if(!B.isEmpty(r)){let l=Ge(r),s=l('[class="sy scon clearfix"]').find("dl"),a=0;for(let o of s){let u=l(l(o).find("dt")).text().replace("\u6309","").replace("\uFF1A",""),c={key:(a+1).toString(),name:u,value:[]},f=l(o).find("a"),m=0;u==="\u5267\u60C5"?m=3:u==="\u5E74\u4EE3"?m=2:u==="\u5730\u533A"&&(m=4);for(let d of f){let y=d.attribs.href.split("/");c.value.push({n:l(d).text(),v:y[m]})}i.push(c),a=a+1}}return i}async setFilterObj(){for(let e of this.classes){let n=e.type_id;n!=="\u6700\u8FD1\u66F4\u65B0"&&(this.filterObj[n]=await this.getFilter(n))}}async setHomeVod(){let e=await this.fetch(this.siteUrl,null,this.getHeader());if(!B.isEmpty(e)){let n=Ge(e);this.homeVodList=await this.parseVodShortListFromDoc(n)}}async setCategory(e,n,r,i){let l=this.siteUrl+e,s=await this.fetch(l,null,this.getHeader());if(!B.isEmpty(s)){let a=e.split("/")[1],o=e.split("/")[2],u=Te(/var _yu_gda_s="(.*?)";/,s),c={action:a,page:parseInt(n),year:i[2]??"0",area:i[3]??"all",class:i[1]??"0",dect:"",id:o},f=await this.fetch(u,c,this.getHeader());if(f!==null){let m=Ge(f);this.vodList=await this.parseVodShortListFromDoc(m)}}}async setDetail(e){let n=this.siteUrl+e,r=await this.fetch(n,null,this.getHeader());if(!B.isEmpty(r)){let i=Ge(r);this.vodDetail=await this.parseVodDetailFromDoc(i);let s="http://test.gqyy8.com:8077/ne2"+/<script type="text\/javascript" src="http:\/\/test.gqyy8.com:8077\/ne2(.*?)"><\/script>/g.exec(r)[1],a=await this.fetch(s,null,this.getHeader());if(!B.isEmpty(a)){let o=this.paraseUrlObject(a);this.vodDetail.vod_play_url=o.play_url,this.vodDetail.vod_play_from=o.play_format}}}async setSearch(e,n){let r=this.siteUrl+"/search.php",i=await this.fetch(r,null,this.getHeader());if(!B.isEmpty(i)){let l={top:10,q:e},s=Te(/var my_search='(.*?)';/,i),a=await this.fetch(s,l,this.getHeader());if(!B.isEmpty(a)){let o=JSON.parse(a.replaceAll("\uFEFF",""));this.vodList=await this.parseVodShortListFromJson(o)}}}},xn=new dS;var hS=class extends Re{constructor(){super()}getName(){return xn.getName()}getAppName(){return xn.getAppName()}getJSName(){return xn.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await xn.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await xn.initCookie(e.server.config.bilicookie),await xn.spiderInit(e),xn.cfgObj.code=0,xn.catOpenStatus=!0,xn.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await xn.setClasses(),this.classes=xn.classes}async setFilterObj(){await xn.setFilterObj(),this.filterObj=xn.filterObj}async setHomeVod(){await xn.setHomeVod(),this.homeVodList=xn.homeVodList}async setCategory(e,n,r,i){await xn.setCategory(e,n,r,i),this.vodList=xn.vodList}async setDetail(e){await xn.setDetail(e),this.vodDetail=xn.vodDetail}async setPlay(e,n,r){await xn.setPlay(e,n,r),this.playUrl=xn.playUrl,this.result=xn.result}async setSearch(e,n,r){await xn.setSearch(e,n,r),this.vodList=xn.vodList,this.result=xn.result}async setProxy(e,n){return await xn.proxy(e,n)}},So=new hS;async function JX(t,e){return await So.init(t,e)}async function KX(t,e){return await So.home(t,e)}async function iAe(t,e){return await So.homeVod(t,e)}async function XX(t,e){return await So.category(t,e)}async function WX(t,e){return await So.detail(t,e)}async function YX(t,e){return await So.play(t,e)}async function QX(t,e){return await So.search(t,e)}async function lAe(t,e){return await So.proxy(t,e)}var ZX={meta:{key:xn.getJSName(),name:xn.getName(),type:xn.getType()},api:async t=>{t.post("/init",JX),t.post("/home",KX),t.post("/category",XX),t.post("/detail",WX),t.post("/play",YX),t.post("/search",QX),t.get("/proxy/:what/:ids/:end",lAe)},spider:{init:JX,home:KX,homeVod:iAe,category:XX,detail:WX,play:YX,search:QX}};var mS=class extends go{constructor(){super(),this.siteUrl="https://cj.lzcaiji.com",this.remove18=!0}getAppName(){return"\u91CF\u5B50\u8D44\u6E90"}getName(){return"\u{1F41D}\u2503\u91CF\u5B50\u8D44\u6E90\u2503\u{1F41D}"}getJSName(){return"liangzi"}getType(){return 3}async spiderInit(e){await super.spiderInit(e)}async init(e){await super.init(e),await this.spiderInit(null)}},An=new mS;var yS=class extends Re{constructor(){super()}getName(){return An.getName()}getAppName(){return An.getAppName()}getJ Line truncated
`,"").replaceAll("\u5267\u60C5\uFF1A",""),n.vod_pic=e("img.lazy")[0].attribs["data-original"],n}async parseVodShortListFromJson(e){let n=[];for(let r of e){let i=new Ne;i.vod_id=r.url,i.vod_pic=r.thumb,i.vod_remarks=r.time,i.vod_name=r.title,n.push(i)}return n}async setClasses(){let e=await this.fetch(this.siteUrl,null,this.getHeader());if(!B.isEmpty(e)){let n=Ge(e),r=n("[class=index-list-l]");for(let i of r){let l=n(n(i).find('[class="h1 clearfix"]')[0]).find("a"),s=l[0].attribs.href,a=n(l[1]).text();B.isEmpty(a)||this.classes.push({type_id:s,type_name:a})}}}async getFilter(e){let n=this.siteUrl+e,r=await this.fetch(n,null,this.getHeader()),i=[];if(!B.isEmpty(r)){let l=Ge(r),s=l('[class="sy scon clearfix"]').find("dl"),a=0;for(let o of s){let u=l(l(o).find("dt")).text().replace("\u6309","").replace("\uFF1A",""),c={key:(a+1).toString(),name:u,value:[]},f=l(o).find("a"),m=0;u==="\u5267\u60C5"?m=3:u==="\u5E74\u4EE3"?m=2:u==="\u5730\u533A"&&(m=4);for(let d of f){let y=d.attribs.href.split("/");c.value.push({n:l(d).text(),v:y[m]})}i.push(c),a=a+1}}return i}async setFilterObj(){for(let e of this.classes){let n=e.type_id;n!=="\u6700\u8FD1\u66F4\u65B0"&&(this.filterObj[n]=await this.getFilter(n))}}async setHomeVod(){let e=await this.fetch(this.siteUrl,null,this.getHeader());if(!B.isEmpty(e)){let n=Ge(e);this.homeVodList=await this.parseVodShortListFromDoc(n)}}async setCategory(e,n,r,i){let l=this.siteUrl+e,s=await this.fetch(l,null,this.getHeader());if(!B.isEmpty(s)){let a=e.split("/")[1],o=e.split("/")[2],u=Te(/var _yu_gda_s="(.*?)";/,s),c={action:a,page:parseInt(n),year:i[2]??"0",area:i[3]??"all",class:i[1]??"0",dect:"",id:o},f=await this.fetch(u,c,this.getHeader());if(f!==null){let m=Ge(f);this.vodList=await this.parseVodShortListFromDoc(m)}}}async setDetail(e){let n=this.siteUrl+e,r=await this.fetch(n,null,this.getHeader());if(!B.isEmpty(r)){let i=Ge(r);this.vodDetail=await this.parseVodDetailFromDoc(i);let s="http://test.gqyy8.com:8077/ne2"+/<script type="text\/javascript" src="http:\/\/test.gqyy8.com:8077\/ne2(.*?)"><\/script>/g.exec(r)[1],a=await this.fetch(s,null,this.getHeader());if(!B.isEmpty(a)){let o=this.paraseUrlObject(a);this.vodDetail.vod_play_url=o.play_url,this.vodDetail.vod_play_from=o.play_format}}}async setSearch(e,n){let r=this.siteUrl+"/search.php",i=await this.fetch(r,null,this.getHeader());if(!B.isEmpty(i)){let l={top:10,q:e},s=Te(/var my_search='(.*?)';/,i),a=await this.fetch(s,l,this.getHeader());if(!B.isEmpty(a)){let o=JSON.parse(a.replaceAll("\uFEFF",""));this.vodList=await this.parseVodShortListFromJson(o)}}}},xn=new dS;var hS=class extends Re{constructor(){super()}getName(){return xn.getName()}getAppName(){return xn.getAppName()}getJSName(){return xn.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await xn.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await xn.initCookie(e.server.config.bilicookie),await xn.spiderInit(e),xn.cfgObj.code=0,xn.catOpenStatus=!0,xn.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await xn.setClasses(),this.classes=xn.classes}async setFilterObj(){await xn.setFilterObj(),this.filterObj=xn.filterObj}async setHomeVod(){await xn.setHomeVod(),this.homeVodList=xn.homeVodList}async setCategory(e,n,r,i){await xn.setCategory(e,n,r,i),this.vodList=xn.vodList}async setDetail(e){await xn.setDetail(e),this.vodDetail=xn.vodDetail}async setPlay(e,n,r){await xn.setPlay(e,n,r),this.playUrl=xn.playUrl,this.result=xn.result}async setSearch(e,n,r){await xn.setSearch(e,n,r),this.vodList=xn.vodList,this.result=xn.result}async setProxy(e,n){return await xn.proxy(e,n)}},So=new hS;async function JX(t,e){return await So.init(t,e)}async function KX(t,e){return await So.home(t,e)}async function iAe(t,e){return await So.homeVod(t,e)}async function XX(t,e){return await So.category(t,e)}async function WX(t,e){return await So.detail(t,e)}async function YX(t,e){return await So.play(t,e)}async function QX(t,e){return await So.search(t,e)}async function lAe(t,e){return await So.proxy(t,e)}var ZX={meta:{key:xn.getJSName(),name:xn.getName(),type:xn.getType()},api:async t=>{t.post("/init",JX),t.post("/home",KX),t.post("/category",XX),t.post("/detail",WX),t.post("/play",YX),t.post("/search",QX),t.get("/proxy/:what/:ids/:end",lAe)},spider:{init:JX,home:KX,homeVod:iAe,category:XX,detail:WX,play:YX,search:QX}};var mS=class extends go{constructor(){super(),this.siteUrl="https://cj.lzcaiji.com",this.remove18=!0}getAppName(){return"\u91CF\u5B50\u8D44\u6E90"}getName(){return"\u{1F41D}\u2503\u91CF\u5B50\u8D44\u6E90\u2503\u{1F41D}"}getJSName(){return"liangzi"}getType(){return 3}async spiderInit(e){await super.spiderInit(e)}async init(e){await super.init(e),await this.spiderInit(null)}},An=new mS;var yS=class extends Re{constructor(){super()}getName(){return An.getName()}getAppName(){return An.getAppName()}getJ Line truncated
<ContentComponent contentType="${f}"/>
<Representation id="${n}" bandwidth="${l}" codecs="${i}" mimeType="${a}" ${m} startWithSAP="${s}">
<BaseURL>${o}</BaseURL>
+1 -1
View File
@@ -1 +1 @@
b8fe79b4b4a7b7895c46a5588e73a49f
bed419e9c7440662dcf73e7f910e127c
+1 -1
View File
@@ -32,7 +32,7 @@ function cryptJs(text, key, iv, type) {
class ChangZhangSpider extends Spider {
constructor() {
super();
this.siteUrl = "https://www.czzy88.com"
this.siteUrl = "https://www.cz233.com"
}
async init(cfg) {