mirror of
https://github.com/vega-org/vega-providers.git
synced 2026-04-17 23:51:44 +00:00
1 line
1.4 KiB
JavaScript
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 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 a of __getOwnPropNames(t))__hasOwnProp.call(e,a)||a===r||__defProp(e,a,{get:()=>t[a],enumerable:!(o=__getOwnPropDesc(t,a))||o.enumerable});return e},__toCommonJS=e=>__copyProps(__defProp({},"__esModule",{value:!0}),e),__async=(e,t,r)=>new Promise((o,a)=>{var n=e=>{try{p(r.next(e))}catch(e){a(e)}},_=e=>{try{p(r.throw(e))}catch(e){a(e)}},p=e=>e.done?o(e.value):Promise.resolve(e.value).then(n,_);p((r=r.apply(e,t)).next())}),stream_exports={};__export(stream_exports,{getStream:()=>getStream});var getStream=__name(function(e){return __async(this,arguments,function*({link:e,signal:t,providerContext:r}){try{const{axios:o,cheerio:a}=r,n=[],[,_]=e.split("&"),p=`https://febbox.vercel.app/api/video-quality?fid=${_}`,s=(yield o.get(p,{signal:t})).data,i=a.load(s.html);return i(".file_quality").each((e,t)=>{const r=i(t).find("p.name").text()+" - "+i(t).find("p.size").text()+" - "+i(t).find("p.speed").text(),o=i(t).attr("data-url");o&&n.push({server:r,type:"mkv",link:o})}),n}catch(e){return[]}})},"getStream");exports.getStream=getStream; |