mirror of
https://github.com/vega-org/vega-providers.git
synced 2026-04-17 23:51:44 +00:00
1 line
2.7 KiB
JavaScript
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 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; |