mirror of
https://github.com/vega-org/vega-providers.git
synced 2026-04-17 23:51:44 +00:00
1 line
2.1 KiB
JavaScript
1 line
2.1 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 i in t)__defProp(e,i,{get:t[i],enumerable:!0})},__copyProps=(e,t,i,o)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let r of __getOwnPropNames(t))__hasOwnProp.call(e,r)||r===i||__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,i)=>new Promise((o,r)=>{var n=e=>{try{l(i.next(e))}catch(e){r(e)}},a=e=>{try{l(i.throw(e))}catch(e){r(e)}},l=e=>e.done?o(e.value):Promise.resolve(e.value).then(n,a);l((i=i.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 i,o,r,n,a,l,s,_,p;try{const{axios:d,cheerio:c,getBaseUrl:m}=t,u=(yield m("showbox"))+e,g=(yield d.get(u)).data,f=c.load(g),y=u.includes("tv")?"series":"movie",v="",h=f(".heading-name").text(),P=(null==(o=null==(i=f(".btn-imdb").text())?void 0:i.match(/\d+(\.\d+)?/g))?void 0:o[0])||"",b=(null==(n=null==(r=f(".cover_follow").attr("style"))?void 0:r.split("url(")[1])?void 0:n.split(")")[0])||"",w=null==(l=null==(a=f(".description").text())?void 0:a.replace(/[\n\t]/g,""))?void 0:l.trim(),x=null==(_=null==(s=f(".heading-name").find("a").attr("href"))?void 0:s.split("/"))?void 0:_.pop(),O=`${u.split("/").slice(0,3).join("/")}/index/share_link?id=${x}&type=${"movie"===y?"1":"2"}`,$=(yield d.get(O)).data.data.link.split("/").pop(),k=`https://www.febbox.com/file/file_share_list?share_key=${$}&is_html=0`,M=(yield d.get(k)).data,j=null==(p=null==M?void 0:M.data)?void 0:p.file_list,D=[];return j&&j.map(e=>{const t=`${e.file_name} (${e.file_size})`,i=e.fid;D.push({title:t,episodesLink:e.is_dir?`${$}&${i}`:`${$}&`})}),{title:h,rating:P,synopsis:w,image:b,imdbId:v,type:y,linkList:D}}catch(e){return{title:"",rating:"",synopsis:"",image:"",imdbId:"",type:"",linkList:[]}}})},"getMeta");exports.getMeta=getMeta; |