mirror of
https://github.com/vega-org/vega-providers.git
synced 2026-04-18 08:01:43 +00:00
1 line
3.3 KiB
JavaScript
1 line
3.3 KiB
JavaScript
"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__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},__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 n of __getOwnPropNames(t))__hasOwnProp.call(e,n)||n===r||__defProp(e,n,{get:()=>t[n],enumerable:!(o=__getOwnPropDesc(t,n))||o.enumerable});return e},__toCommonJS=e=>__copyProps(__defProp({},"__esModule",{value:!0}),e),__async=(e,t,r)=>new Promise((o,n)=>{var a=e=>{try{i(r.next(e))}catch(e){n(e)}},s=e=>{try{i(r.throw(e))}catch(e){n(e)}},i=e=>e.done?o(e.value):Promise.resolve(e.value).then(a,s);i((r=r.apply(e,t)).next())}),stream_exports={};function superVideoExtractor(e){return __async(this,null,function*(){var t,r;try{var o=/eval\(function\((.*?)\)\{.*?return p\}.*?\('(.*?)'\.split/.exec(e);let s="";if(o){var n=o[2];s=null==(t=n.split("',36,"))?void 0:t[0].trim();let e=36,r=n.split("',36,")[1].slice(2).split("|").length,i=n.split("',36,")[1].slice(2).split("|");for(;r--;)if(i[r]){var a=new RegExp("\\b"+r.toString(e)+"\\b","g");s=s.replace(a,i[r])}}return(null==(r=null==s?void 0:s.match(/file:\s*"([^"]+\.m3u8[^"]*)"/))?void 0:r[1])||""}catch(e){return""}})}__export(stream_exports,{getStream:()=>getStream}),__name(superVideoExtractor,"superVideoExtractor");var getStream=__name(function(e){return __async(this,arguments,function*({link:e,type:t,providerContext:r}){try{const{axios:o,cheerio:n,commonHeaders:a}=r;function s(e){return __async(this,arguments,function*({imdb:e}){try{const t="https://guardahd.stream/set-movie-a/"+e,r=(yield o.get(t,{timeout:4e3})).data,s=n.load(r)('li:contains("supervideo")').attr("data-link");if(!s)return null;const i=new AbortController,l=i.signal;setTimeout(()=>i.abort(),4e3);const p=yield fetch("https:"+s,{signal:l,headers:__spreadValues({},a)}),_=yield p.text();return yield superVideoExtractor(_)}catch(e){}})}function i(e){return __async(this,arguments,function*({imdb:e,type:t,season:r,episode:s}){try{const i="https://mostraguarda.stream"+("tv"===t?`/serie/${e}/${r}/${s}`:`/movie/${e}`),l=(yield o(i,{timeout:4e3})).data,p=n.load(l)('li:contains("supervideo")').attr("data-link");if(!p)return null;const _=new AbortController,u=_.signal;setTimeout(()=>_.abort(),4e3);const c=yield fetch("https:"+p,{signal:u,headers:__spreadValues({},a)}),d=yield c.text();return yield superVideoExtractor(d)}catch(e){}})}__name(s,"ExtractGuardahd"),__name(i,"GetMostraguardaStream");const l=[],[p,_,u]=e.split("-"),c=yield i({imdb:p,type:t,season:_,episode:u});c&&l.push({server:"Supervideo 1",link:c,type:"m3u8"});const d=yield s({imdb:p,type:t,season:_,episode:u});return d&&l.push({server:"Supervideo 2",link:d,type:"m3u8"}),l}catch(m){return[]}})},"getStream");exports.getStream=getStream; |