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

2
dist/uhd/meta.js vendored
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/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","Upgrade-Insecure-Requests":"1","User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36 Edg/120.0.0.0"},getMeta=function(_a){return __awaiter(this,arguments,void 0,function*({link:link,providerContext:providerContext}){var _b;try{const{axios:axios,cheerio:cheerio}=providerContext,url=link,res=yield axios.get(url,{headers:headers}),html=yield res.data,$=cheerio.load(html),title=$("h2:first").text()||"",image=$("h2").siblings().find("img").attr("src")||"",episodes=[];return $(".mks_separator,p:contains('mks_separator')").each((index,element)=>{$(element).nextUntil(".mks_separator").each((index,element)=>{const title=$(element).text(),episodesList=[];$(element).next("p").find("a").each((index,element)=>{const title=$(element).text(),link=$(element).attr("href");title&&link&&!title.toLocaleLowerCase().includes("zip")&&episodesList.push({title:title,link:link})}),title&&episodesList.length>0&&episodes.push({title:title,directLinks:episodesList})})}),$("hr").each((index,element)=>{$(element).nextUntil("hr").each((index,element)=>{const title=$(element).text(),episodesList=[];$(element).next("p").find("a").each((index,element)=>{const title=$(element).text(),link=$(element).attr("href");title&&link&&!title.toLocaleLowerCase().includes("zip")&&episodesList.push({title:title,link:link})}),title&&episodesList.length>0&&episodes.push({title:title,directLinks:episodesList})})}),{title:title.match(/^Download\s+([^(\[]+)/i)?(null===(_b=null==title?void 0:title.match(/^Download\s+([^(\[]+)/i))||void 0===_b?void 0:_b[1])||"":title.replace("Download","")||"",image:image,imdbId:"",synopsis:title,type:"",linkList:episodes}}catch(error){return{title:"",image:"",imdbId:"",synopsis:"",linkList:[],type:"uhd"}}})};exports.getMeta=getMeta;
"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__name=(e,t)=>__defProp(e,"name",{value:t,configurable:!0}),__export=(e,t)=>{for(var a in t)__defProp(e,a,{get:t[a],enumerable:!0})},__copyProps=(e,t,a,o)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let r of __getOwnPropNames(t))__hasOwnProp.call(e,r)||r===a||__defProp(e,r,{get:()=>t[r],enumerable:!(o=__getOwnPropDesc(t,r))||o.enumerable});return e},__toCommonJS=e=>__copyProps(__defProp({},"__esModule",{value:!0}),e),__async=(e,t,a)=>new Promise((o,r)=>{var n=e=>{try{s(a.next(e))}catch(e){r(e)}},i=e=>{try{s(a.throw(e))}catch(e){r(e)}},s=e=>e.done?o(e.value):Promise.resolve(e.value).then(n,i);s((a=a.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/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","Upgrade-Insecure-Requests":"1","User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36 Edg/120.0.0.0"},getMeta=__name(function(e){return __async(this,arguments,function*({link:e,providerContext:t}){var a;try{const{axios:o,cheerio:r}=t,n=e,i=yield o.get(n,{headers:headers}),s=yield i.data,c=r.load(s),p=c("h2:first").text()||"",l=c("h2").siblings().find("img").attr("src")||"",_=[];return c(".mks_separator,p:contains('mks_separator')").each((e,t)=>{c(t).nextUntil(".mks_separator").each((e,t)=>{const a=c(t).text(),o=[];c(t).next("p").find("a").each((e,t)=>{const a=c(t).text(),r=c(t).attr("href");a&&r&&!a.toLocaleLowerCase().includes("zip")&&o.push({title:a,link:r})}),a&&o.length>0&&_.push({title:a,directLinks:o})})}),c("hr").each((e,t)=>{c(t).nextUntil("hr").each((e,t)=>{const a=c(t).text(),o=[];c(t).next("p").find("a").each((e,t)=>{const a=c(t).text(),r=c(t).attr("href");a&&r&&!a.toLocaleLowerCase().includes("zip")&&o.push({title:a,link:r})}),a&&o.length>0&&_.push({title:a,directLinks:o})})}),{title:p.match(/^Download\s+([^(\[]+)/i)?(null==(a=null==p?void 0:p.match(/^Download\s+([^(\[]+)/i))?void 0:a[1])||"":p.replace("Download","")||"",image:l,imdbId:"",synopsis:p,type:"",linkList:_}}catch(e){return{title:"",image:"",imdbId:"",synopsis:"",linkList:[],type:"uhd"}}})},"getMeta");exports.getMeta=getMeta;