This commit is contained in:
Himanshu
2026-02-03 21:48:37 +05:30
parent c4d3340b16
commit a179a130d6
192 changed files with 184 additions and 192 deletions

View File

@@ -1 +1 @@
var __awaiter=this&&this.__awaiter||function(thisArg,_arguments,P,generator){return new(P||(P=Promise))(function(resolve,reject){function fulfilled(value){try{step(generator.next(value))}catch(e){reject(e)}}function rejected(value){try{step(generator.throw(value))}catch(e){reject(e)}}function step(result){var value;result.done?resolve(result.value):(value=result.value,value instanceof P?value:new P(function(resolve){resolve(value)})).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())})};exports.getMeta=void 0;const headers={Accept:"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7","Cache-Control":"no-store","Accept-Language":"en-US,en;q=0.9",DNT:"1","sec-ch-ua":'"Not_A Brand";v="8", "Chromium";v="120", "Microsoft Edge";v="120"',"sec-ch-ua-mobile":"?0","sec-ch-ua-platform":'"Windows"',"Sec-Fetch-Dest":"document","Sec-Fetch-Mode":"navigate","Sec-Fetch-Site":"none","Sec-Fetch-User":"?1",Cookie:"xla=s4t; _ga=GA1.1.1081149560.1756378968; _ga_BLZGKYN5PF=GS2.1.s1756378968$o1$g1$t1756378984$j44$l0$h0","Upgrade-Insecure-Requests":"1","User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 Edg/131.0.0.0"},getMeta=function(_a){return __awaiter(this,arguments,void 0,function*({link:link,providerContext:providerContext}){var _b;const{cheerio:cheerio}=providerContext,url=link,baseUrl=url.split("/").slice(0,3).join("/"),emptyResult={title:"",synopsis:"",image:"",imdbId:"",type:"movie",linkList:[]};try{const response=yield fetch(url,{headers:Object.assign(Object.assign({},headers),{Referer:baseUrl})}),data=yield response.text(),$=cheerio.load(data),infoContainer=$(".content.right").first(),result={title:"",synopsis:"",image:"",imdbId:"",type:"movie",linkList:[]};/S\d+|Season \d+|TV Series\/Shows/i.test(infoContainer.find("h1").text()+$(".sgeneros").text())?result.type="series":result.type="movie";const rawTitle=$("h1").first().text().trim();let finalTitle=rawTitle.replace(/ Download.*|\[Episode \d+ Added\]/g,"").trim();finalTitle=finalTitle.split(/\(2025\)| S\d+/i)[0].trim()||"Unknown Title",result.title=finalTitle;const imdbMatch=null===(_b=infoContainer.html())||void 0===_b?void 0:_b.match(/tt\d+/);result.imdbId=imdbMatch?imdbMatch[0]:"";let image=infoContainer.find(".poster img[src]").first().attr("src")||"";image.startsWith("//")&&(image="https:"+image),(image.includes("no-thumbnail")||image.includes("placeholder"))&&(image=""),result.image=image,result.synopsis=$("#info .wp-content").text().trim()||"";const links=[];return $("#download .links_table table tbody").find("tr").each((index,element)=>{var _a;const row=$(element),quality=row.find("strong.quality").text().trim(),size=row.find("td:nth-child(4)").text().trim(),directLinkAnchor=row.find("td a").first(),directLink=directLinkAnchor.attr("href"),linkTitle=directLinkAnchor.text().trim();if(quality&&directLink){const directLinks=[{title:linkTitle||"Download Link",link:directLink,type:result.type}],seasonMatch=null===(_a=rawTitle.match(/S(\d+)/))||void 0===_a?void 0:_a[1];let fullTitle=`${result.title}`;seasonMatch&&(fullTitle+=` Season ${seasonMatch}`),fullTitle+=` - ${quality}`,size&&(fullTitle+=` (${size})`),links.push({title:fullTitle,quality:quality.replace(/[^0-9p]/g,""),directLinks:directLinks})}}),result.linkList=links,result}catch(err){return emptyResult}})};exports.getMeta=getMeta;
"use strict";var __defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropNames=Object.getOwnPropertyNames,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,t,r)=>t in e?__defProp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,__spreadValues=(e,t)=>{for(var r in t||(t={}))__hasOwnProp.call(t,r)&&__defNormalProp(e,r,t[r]);if(__getOwnPropSymbols)for(var r of __getOwnPropSymbols(t))__propIsEnum.call(t,r)&&__defNormalProp(e,r,t[r]);return e},__spreadProps=(e,t)=>__defProps(e,__getOwnPropDescs(t)),__name=(e,t)=>__defProp(e,"name",{value:t,configurable:!0}),__export=(e,t)=>{for(var r in t)__defProp(e,r,{get:t[r],enumerable:!0})},__copyProps=(e,t,r,o)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let n of __getOwnPropNames(t))__hasOwnProp.call(e,n)||n===r||__defProp(e,n,{get:()=>t[n],enumerable:!(o=__getOwnPropDesc(t,n))||o.enumerable});return e},__toCommonJS=e=>__copyProps(__defProp({},"__esModule",{value:!0}),e),__async=(e,t,r)=>new Promise((o,n)=>{var i=e=>{try{a(r.next(e))}catch(e){n(e)}},s=e=>{try{a(r.throw(e))}catch(e){n(e)}},a=e=>e.done?o(e.value):Promise.resolve(e.value).then(i,s);a((r=r.apply(e,t)).next())}),meta_exports={};__export(meta_exports,{getMeta:()=>getMeta});var headers={Accept:"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7","Cache-Control":"no-store","Accept-Language":"en-US,en;q=0.9",DNT:"1","sec-ch-ua":'"Not_A Brand";v="8", "Chromium";v="120", "Microsoft Edge";v="120"',"sec-ch-ua-mobile":"?0","sec-ch-ua-platform":'"Windows"',"Sec-Fetch-Dest":"document","Sec-Fetch-Mode":"navigate","Sec-Fetch-Site":"none","Sec-Fetch-User":"?1",Cookie:"xla=s4t; _ga=GA1.1.1081149560.1756378968; _ga_BLZGKYN5PF=GS2.1.s1756378968$o1$g1$t1756378984$j44$l0$h0","Upgrade-Insecure-Requests":"1","User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 Edg/131.0.0.0"},getMeta=__name(function(e){return __async(this,arguments,function*({link:e,providerContext:t}){var r;const{cheerio:o}=t,n=e,i=n.split("/").slice(0,3).join("/"),s={title:"",synopsis:"",image:"",imdbId:"",type:"movie",linkList:[]};try{const e=yield fetch(n,{headers:__spreadProps(__spreadValues({},headers),{Referer:i})}),t=yield e.text(),s=o.load(t),a=s(".content.right").first(),p={title:"",synopsis:"",image:"",imdbId:"",type:"movie",linkList:[]};/S\d+|Season \d+|TV Series\/Shows/i.test(a.find("h1").text()+s(".sgeneros").text())?p.type="series":p.type="movie";const l=s("h1").first().text().trim();let c=l.replace(/ Download.*|\[Episode \d+ Added\]/g,"").trim();c=c.split(/\(2025\)| S\d+/i)[0].trim()||"Unknown Title",p.title=c;const _=null==(r=a.html())?void 0:r.match(/tt\d+/);p.imdbId=_?_[0]:"";let d=a.find(".poster img[src]").first().attr("src")||"";d.startsWith("//")&&(d="https:"+d),(d.includes("no-thumbnail")||d.includes("placeholder"))&&(d=""),p.image=d,p.synopsis=s("#info .wp-content").text().trim()||"";const m=[];return s("#download .links_table table tbody").find("tr").each((e,t)=>{var r;const o=s(t),n=o.find("strong.quality").text().trim(),i=o.find("td:nth-child(4)").text().trim(),a=o.find("td a").first(),c=a.attr("href"),_=a.text().trim();if(n&&c){const e=[{title:_||"Download Link",link:c,type:p.type}],t=null==(r=l.match(/S(\d+)/))?void 0:r[1];let o=`${p.title}`;t&&(o+=` Season ${t}`),o+=` - ${n}`,i&&(o+=` (${i})`),m.push({title:o,quality:n.replace(/[^0-9p]/g,""),directLinks:e})}}),p.linkList=m,p}catch(e){return s}})},"getMeta");exports.getMeta=getMeta;