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,__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 n of __getOwnPropNames(t))__hasOwnProp.call(e,n)||n===r||__defProp(e,n,{get:()=>t[n],enumerable:!(o=__getOwnPropDesc(t,n))||o.enumerable});return e},__toCommonJS=e=>__copyProps(__defProp({},"__esModule",{value:!0}),e),__async=(e,t,r)=>new Promise((o,n)=>{var a=e=>{try{p(r.next(e))}catch(e){n(e)}},_=e=>{try{p(r.throw(e))}catch(e){n(e)}},p=e=>e.done?o(e.value):Promise.resolve(e.value).then(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:n}=t,a=e,_=(yield o.get(a)).data,p=n.load(_),s={title:p(".imdbwp__title").text()||p("strong:contains('Full Name:')").parent().clone().children().remove().end().text().trim(),synopsis:p(".imdbwp__teaser").text()||p(".liTOue").children("p").first().text(),image:p(".imdbwp__thumb").find("img").attr("src")||p("span:contains('ScreenShots:')").parent().next("p").children("img").first().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(),n=p(t).next("p").find(".maxbutton-episode-links,.maxbutton-g-drive,.maxbutton-af-download").attr("href"),a=p(t).next("p").find(".maxbutton-download-links").attr("href");(a||n&&"javascript:void(0);"!==n)&&i.push({title:o.replace("Download ","").trim()||"Download",episodesLink:n||"",directLinks:a?[{link:a,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; |