mirror of
https://github.com/vega-org/vega-providers.git
synced 2026-04-17 23:51:44 +00:00
1 line
1.8 KiB
JavaScript
1 line
1.8 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 o in t)__defProp(e,o,{get:t[o],enumerable:!0})},__copyProps=(e,t,o,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let i of __getOwnPropNames(t))__hasOwnProp.call(e,i)||i===o||__defProp(e,i,{get:()=>t[i],enumerable:!(r=__getOwnPropDesc(t,i))||r.enumerable});return e},__toCommonJS=e=>__copyProps(__defProp({},"__esModule",{value:!0}),e),__async=(e,t,o)=>new Promise((r,i)=>{var n=e=>{try{s(o.next(e))}catch(e){i(e)}},a=e=>{try{s(o.throw(e))}catch(e){i(e)}},s=e=>e.done?r(e.value):Promise.resolve(e.value).then(n,a);s((o=o.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 o;try{const{axios:r,cheerio:i}=t,n=e,a=e.split("/").slice(0,3).join("/"),s=yield r.get(n),_=yield s.data,p=i.load(_),l=(null==(o=p(".movie_info").find('a[href*="imdb.com/title/tt"]:not([href*="imdb.com/title/tt/"])').attr("href"))?void 0:o.split("/")[4])||"",c=p(".show_season").html()?"series":"movie",d=[];return p(".show_season").each((e,t)=>{const o="Season "+p(t).attr("data-id"),r=[];p(t).children().each((e,t)=>{const o=p(t).find("a").children().remove().end().text().trim().replace("E","Epiosode "),i=a+p(t).find("a").attr("href");o&&i&&r.push({title:o,link:i})}),d.push({title:o,directLinks:r})}),"movie"===c&&d.push({title:"Movie",directLinks:[{link:e,title:"Movie",type:"movie"}]}),{title:"",image:"",imdbId:l,synopsis:"",type:c,linkList:d}}catch(e){return{title:"",image:"",imdbId:"",synopsis:"",linkList:[],type:"uhd"}}})},"getMeta");exports.getMeta=getMeta; |