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

1 line
2.0 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{i(o.next(e))}catch(e){n(e)}},a=e=>{try{i(o.throw(e))}catch(e){n(e)}},i=e=>e.done?r(e.value):Promise.resolve(e.value).then(s,a);i((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}){var o;try{if(!e.includes("luxelinks")||e.includes("cinemalux")){const r=null==(o=(yield t.axios.get(e,{headers:t.commonHeaders})).data.match(/"link":"([^"]+)"/))?void 0:o[1];if(r)e=r?atob(r):e;else{const t=yield fetch("https://cm-decrypt.8man.workers.dev/cinemaluxe",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:e})}),o=yield t.json();e=(null==o?void 0:o.redirectUrl)||e}}const r=[];if(e.includes("luxedrive")||e.includes("drive.linkstore"))return r.push({title:"Movie",link:e}),r;const n=(yield t.axios.get(e,{headers:t.commonHeaders})).data;let s=t.cheerio.load(n);return s("a.maxbutton-4,a.maxbutton,.maxbutton-hubcloud,.ep-simple-button").map((e,t)=>{var o;const n=null==(o=s(t).text())?void 0:o.trim(),a=s(t).attr("href");n&&a&&!n.includes("Batch")&&!n.toLowerCase().includes("zip")&&r.push({title:n.replace(/\(\d{4}\)/,"").replace("Download","Movie").replace("⚡","").trim(),link:a})}),r}catch(e){return[]}})},"getEpisodes");exports.getEpisodes=getEpisodes;