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

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,r,t)=>r in e?__defProp(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,__spreadValues=(e,r)=>{for(var t in r||(r={}))__hasOwnProp.call(r,t)&&__defNormalProp(e,t,r[t]);if(__getOwnPropSymbols)for(var t of __getOwnPropSymbols(r))__propIsEnum.call(r,t)&&__defNormalProp(e,t,r[t]);return e},__spreadProps=(e,r)=>__defProps(e,__getOwnPropDescs(r)),__name=(e,r)=>__defProp(e,"name",{value:r,configurable:!0}),__export=(e,r)=>{for(var t in r)__defProp(e,t,{get:r[t],enumerable:!0})},__copyProps=(e,r,t,o)=>{if(r&&"object"==typeof r||"function"==typeof r)for(let a of __getOwnPropNames(r))__hasOwnProp.call(e,a)||a===t||__defProp(e,a,{get:()=>r[a],enumerable:!(o=__getOwnPropDesc(r,a))||o.enumerable});return e},__toCommonJS=e=>__copyProps(__defProp({},"__esModule",{value:!0}),e),__async=(e,r,t)=>new Promise((o,a)=>{var _=e=>{try{p(t.next(e))}catch(e){a(e)}},n=e=>{try{p(t.throw(e))}catch(e){a(e)}},p=e=>e.done?o(e.value):Promise.resolve(e.value).then(_,n);p((t=t.apply(e,r)).next())}),stream_exports={};__export(stream_exports,{getStream:()=>getStream});var getStream=__name(e=>__async(null,[e],function*({link:e,providerContext:r}){var t,o;try{const{cheerio:a,commonHeaders:_,axios:n}=r,p=JSON.parse(e),s=[],l=(null==p?void 0:p.baseUrl)+"/api/"+(null==p?void 0:p.slug),c=(null==(o=null==(t=(yield n.get(l,{headers:_})).data.data)?void 0:t[0])?void 0:o.url).split('src="')[1].split('"')[0],i=yield n.get(c,{headers:__spreadProps(__spreadValues({},_),{Referer:null==p?void 0:p.baseUrl})}),u=a.load(i.data)('script:contains("eval")').html();if(!u)throw new Error("Unable to find script");const d=unpackJavaScript(u.trim());return s.push({link:d,server:"rido",type:"m3u8",headers:{Referer:c}}),s}catch(e){return[]}}),"getStream");function unpackJavaScript(e){const r="aHR"+e.split("|aHR")[1].split("|")[0];function t(e){return e+"=".repeat((4-e.length%4)%4)}return __name(t,"addPadding"),atob(t(r))}__name(unpackJavaScript,"unpackJavaScript"),exports.getStream=getStream;