mirror of
https://github.com/vega-org/vega-providers.git
synced 2026-04-17 23:51:44 +00:00
1 line
2.5 KiB
JavaScript
1 line
2.5 KiB
JavaScript
"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 _ of __getOwnPropNames(t))__hasOwnProp.call(e,_)||_===r||__defProp(e,_,{get:()=>t[_],enumerable:!(o=__getOwnPropDesc(t,_))||o.enumerable});return e},__toCommonJS=e=>__copyProps(__defProp({},"__esModule",{value:!0}),e),__async=(e,t,r)=>new Promise((o,_)=>{var n=e=>{try{p(r.next(e))}catch(e){_(e)}},a=e=>{try{p(r.throw(e))}catch(e){_(e)}},p=e=>e.done?o(e.value):Promise.resolve(e.value).then(n,a);p((r=r.apply(e,t)).next())}),meta_exports={};__export(meta_exports,{getMeta:()=>getMeta});var getMeta=__name(function(e){return __async(this,arguments,function*({link:e,providerContext:t}){var r;try{const{axios:o,cheerio:_}=t,n=e,a=(yield o.get(n)).data,p=_.load(a),s={title:p(".imdbwp__title").text(),synopsis:p(".imdbwp__teaser").text(),image:p(".imdbwp__thumb").find("img").attr("src")||"",imdbId:(null==(r=p(".imdbwp__link").attr("href"))?void 0:r.split("/")[4])||"",type:p(".thecontent").text().toLocaleLowerCase().includes("season")?"series":"movie"},i=[];return p("h3,h4").map((e,t)=>{var r;const o=p(t).text(),_=p(t).next("p").find(".maxbutton-episode-links,.maxbutton-g-drive,.maxbutton-af-download").attr("href"),n=p(t).next("p").find(".maxbutton-download-links").attr("href");(n||_&&"javascript:void(0);"!==_)&&i.push({title:o.replace("Download ","").trim()||"Download",episodesLink:_||"",directLinks:n?[{link:n,title:"Movie",type:"movie"}]:[],quality:(null==(r=null==o?void 0:o.match(/\d+p\b/))?void 0:r[0])||""})}),__spreadProps(__spreadValues({},s),{linkList:i})}catch(e){return{title:"",synopsis:"",image:"",imdbId:"",type:"movie",linkList:[]}}})},"getMeta");exports.getMeta=getMeta; |