mirror of
https://github.com/vega-org/vega-providers.git
synced 2026-04-17 23:51:44 +00:00
1 line
2.3 KiB
JavaScript
1 line
2.3 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{s(r.next(e))}catch(e){_(e)}},a=e=>{try{s(r.throw(e))}catch(e){_(e)}},s=e=>e.done?o(e.value):Promise.resolve(e.value).then(n,a);s((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}){try{const{cheerio:r}=t,o=e,_=yield fetch(o),n=yield _.text(),a=r.load(n),s={title:a('.c_h2:contains("Title(s):")').text().replace("Title(s):","").trim().split("\n")[0],synopsis:a('.c_h2b:contains("Summary:"),.c_h2:contains("Summary:")').text().replace("Summary:","").trim(),image:a(".a_img").attr("src")||"",imdbId:"",type:"series"},p=[];return a(".episode").map((e,t)=>{const r="https://www.tokyoinsider.com"+a(t).find("a").attr("href")||a(".download-link").attr("href");let o=a(t).find("a").find("em").text()+" "+a(t).find("a").find("strong").text();o.trim()||(o=a(".download-link").text()),r&&o.trim()&&p.push({title:o,link:r})}),__spreadProps(__spreadValues({},s),{linkList:[{title:s.title,directLinks:p}]})}catch(e){return{title:"",synopsis:"",image:"",imdbId:"",type:"series",linkList:[]}}})},"getMeta");exports.getMeta=getMeta; |