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,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{axios:axios,cheerio:cheerio}=providerContext,url=link,baseUrl=url.split("/").slice(0,3).join("/"),emptyResult={title:"",synopsis:"",image:"",imdbId:"",type:"movie",linkList:[]};try{const response=yield axios.get(url,{headers:Object.assign(Object.assign({},headers),{Referer:baseUrl})}),$=cheerio.load(response.data),infoContainer=$(".entry-content, .post-inner").first(),result={title:"",synopsis:"",image:"",imdbId:"",type:"movie",linkList:[]},downloadTitleMatch=infoContainer.find("h6 span").first().text().match(/(.*)\s*\(\d{4}\)/);if(downloadTitleMatch&&(result.title=downloadTitleMatch[1].trim()),!result.title||"Unknown Title"===result.title){const rawTitle=$("#movie_title a").text().trim();result.title=rawTitle.replace(/<small>.*<\/small>/,"").trim()||"Unknown Title"}const firstDownloadHeadingText=infoContainer.find("h6").first().text(),isSeries=firstDownloadHeadingText.includes("S01")||firstDownloadHeadingText.includes("E01")||firstDownloadHeadingText.toLowerCase().includes("season");result.type=isSeries?"series":"movie";const imdbMatch=null===(_b=$("#movie_title a").attr("href"))||void 0===_b?void 0:_b.match(/tt\d+/);result.imdbId=imdbMatch?imdbMatch[0]:"";let image=infoContainer.find('img[decoding="async"]').first().attr("src")||"";image.startsWith("//")&&(image="https:"+image),result.image=image,result.synopsis=infoContainer.find("#summary b:contains('Summary:')").parent().text().replace("Summary:","").trim()||"";const links=[];return infoContainer.find("h6").filter((_,el)=>!$(el).text().includes("Watch Online")).each((index,element)=>{var _a,_b;const el=$(element),fullTitle=el.text().trim(),qualityMatch=(null===(_a=fullTitle.match(/\d{3,4}p\b/))||void 0===_a?void 0:_a[0])||"",fileSizeMatch=(null===(_b=fullTitle.match(/\[([^\]]+)\](?=[^\[]*$)/))||void 0===_b?void 0:_b[1])||"",nextSiblings=el.nextUntil("h6, hr");nextSiblings.find("a").add(nextSiblings.filter("a")).each((i,btn)=>{const link=$(btn).attr("href"),seMatch=fullTitle.match(/(S\d{2}E\d{2}|S\d{2}|E\d{2})/),seasonEpisode=seMatch?`${seMatch[0]} | `:"";links.push({title:`${seasonEpisode}${qualityMatch}${fileSizeMatch?" | "+fileSizeMatch:""}`.trim().replace(/\|$/,"").trim(),quality:qualityMatch,episodesLink:link})})}),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 a of __getOwnPropNames(t))__hasOwnProp.call(e,a)||a===r||__defProp(e,a,{get:()=>t[a],enumerable:!(o=__getOwnPropDesc(t,a))||o.enumerable});return e},__toCommonJS=e=>__copyProps(__defProp({},"__esModule",{value:!0}),e),__async=(e,t,r)=>new Promise((o,a)=>{var n=e=>{try{s(r.next(e))}catch(e){a(e)}},i=e=>{try{s(r.throw(e))}catch(e){a(e)}},s=e=>e.done?o(e.value):Promise.resolve(e.value).then(n,i);s((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,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{axios:o,cheerio:a}=t,n=e,i=n.split("/").slice(0,3).join("/"),s={title:"",synopsis:"",image:"",imdbId:"",type:"movie",linkList:[]};try{const e=yield o.get(n,{headers:__spreadProps(__spreadValues({},headers),{Referer:i})}),t=a.load(e.data),s=t(".entry-content, .post-inner").first(),p={title:"",synopsis:"",image:"",imdbId:"",type:"movie",linkList:[]},c=s.find("h6 span").first().text().match(/(.*)\s*\(\d{4}\)/);if(c&&(p.title=c[1].trim()),!p.title||"Unknown Title"===p.title){const e=t("#movie_title a").text().trim();p.title=e.replace(/<small>.*<\/small>/,"").trim()||"Unknown Title"}const l=s.find("h6").first().text(),_=l.includes("S01")||l.includes("E01")||l.toLowerCase().includes("season");p.type=_?"series":"movie";const m=null==(r=t("#movie_title a").attr("href"))?void 0:r.match(/tt\d+/);p.imdbId=m?m[0]:"";let d=s.find('img[decoding="async"]').first().attr("src")||"";d.startsWith("//")&&(d="https:"+d),p.image=d,p.synopsis=s.find("#summary b:contains('Summary:')").parent().text().replace("Summary:","").trim()||"";const f=[];return s.find("h6").filter((e,r)=>!t(r).text().includes("Watch Online")).each((e,r)=>{var o,a;const n=t(r),i=n.text().trim(),s=(null==(o=i.match(/\d{3,4}p\b/))?void 0:o[0])||"",p=(null==(a=i.match(/\[([^\]]+)\](?=[^\[]*$)/))?void 0:a[1])||"",c=n.nextUntil("h6, hr");c.find("a").add(c.filter("a")).each((e,r)=>{const o=t(r).attr("href"),a=i.match(/(S\d{2}E\d{2}|S\d{2}|E\d{2})/),n=a?`${a[0]} | `:"";f.push({title:`${n}${s}${p?" | "+p:""}`.trim().replace(/\|$/,"").trim(),quality:s,episodesLink:o})})}),p.linkList=f,p}catch(e){return s}})},"getMeta");exports.getMeta=getMeta;