Files
vega-providers/dist/hdhub4u/meta.js
Himanshu a179a130d6 build
2026-02-03 21:48:37 +05:30

1 line
2.7 KiB
JavaScript

"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 n in t)__defProp(e,n,{get:t[n],enumerable:!0})},__copyProps=(e,t,n,a)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let r of __getOwnPropNames(t))__hasOwnProp.call(e,r)||r===n||__defProp(e,r,{get:()=>t[r],enumerable:!(a=__getOwnPropDesc(t,r))||a.enumerable});return e},__toCommonJS=e=>__copyProps(__defProp({},"__esModule",{value:!0}),e),__async=(e,t,n)=>new Promise((a,r)=>{var o=e=>{try{s(n.next(e))}catch(e){r(e)}},i=e=>{try{s(n.throw(e))}catch(e){r(e)}},s=e=>e.done?a(e.value):Promise.resolve(e.value).then(o,i);s((n=n.apply(e,t)).next())}),meta_exports={};__export(meta_exports,{getMeta:()=>getMeta});var hdbHeaders={Cookie:"xla=s4t",Referer:"https://google.com","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 n;try{const{axios:a,cheerio:r}=t,o=e,i=(yield a.get(o,{headers:hdbHeaders})).data,s=r.load(i),p=s(".page-body"),l=(null==(n=p.find('a[href*="imdb.com/title/tt"]:not([href*="imdb.com/title/tt/"])').attr("href"))?void 0:n.split("/")[4])||"",c=p.find('h2[data-ved="2ahUKEwjL0NrBk4vnAhWlH7cAHRCeAlwQ3B0oATAfegQIFBAM"],h2[data-ved="2ahUKEwiP0pGdlermAhUFYVAKHV8tAmgQ3B0oATAZegQIDhAM"]').text(),d=c.toLocaleLowerCase().includes("season")?"series":"movie",_=p.find('strong:contains("DESCRIPTION")').parent().text().replace("DESCRIPTION:",""),h=p.find('img[decoding="async"]').attr("src")||"",m=[],f=[];return s('strong:contains("EPiSODE")').map((e,t)=>{const n=s(t).parent().parent().text(),a=s(t).parent().parent().parent().next().next().find("a").attr("href")||s(t).parent().parent().parent().next().find("a").attr("href");a&&a&&f.push({title:n,link:a})}),0===f.length&&p.find('a:contains("EPiSODE")').map((e,t)=>{const n=s(t).text(),a=s(t).attr("href");a&&f.push({title:n.toLocaleUpperCase(),link:a})}),f.length>0&&m.push({title:c,directLinks:f}),0===f.length&&p.find('a:contains("480"),a:contains("720"),a:contains("1080"),a:contains("2160"),a:contains("4K")').map((e,t)=>{var n;const a=(null==(n=s(t).text().match(/\b(480p|720p|1080p|2160p)\b/i))?void 0:n[0])||"",r=s(t).attr("href"),o=s(t).text();r&&m.push({directLinks:[{link:r,title:"Movie",type:"movie"}],quality:a,title:o})}),{title:c,synopsis:_,image:h,imdbId:l,type:d,linkList:m}}catch(e){return{title:"",synopsis:"",image:"",imdbId:"",type:"movie",linkList:[]}}})},"getMeta");exports.getMeta=getMeta;