Files
vega-providers/dist/world4u/episodes.js
Himanshu a179a130d6 build
2026-02-03 21:48:37 +05:30

1 line
1.4 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 n of __getOwnPropNames(t))__hasOwnProp.call(e,n)||n===o||__defProp(e,n,{get:()=>t[n],enumerable:!(r=__getOwnPropDesc(t,n))||r.enumerable});return e},__toCommonJS=e=>__copyProps(__defProp({},"__esModule",{value:!0}),e),__async=(e,t,o)=>new Promise((r,n)=>{var s=e=>{try{_(o.next(e))}catch(e){n(e)}},p=e=>{try{_(o.throw(e))}catch(e){n(e)}},_=e=>e.done?r(e.value):Promise.resolve(e.value).then(s,p);_((o=o.apply(e,t)).next())}),episodes_exports={};__export(episodes_exports,{getEpisodes:()=>getEpisodes});var getEpisodes=__name(function(e){return __async(this,arguments,function*({url:e,providerContext:t}){const{axios:o,cheerio:r}=t;try{const t=(yield o.get(e)).data;let n=r.load(t);const s=[];return n('strong:contains("Episode"),strong:contains("1080"),strong:contains("720"),strong:contains("480")').map((e,t)=>{const o=n(t).text(),r=n(t).parent().parent().next("h4").find("a").attr("href");r&&!o.includes("zip")&&s.push({title:o,link:r})}),s}catch(t){return[{title:"Server 1",link:e}]}})},"getEpisodes");exports.getEpisodes=getEpisodes;