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

1 line
1.9 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)}},l=e=>{try{i(o.throw(e))}catch(e){n(e)}},i=e=>e.done?r(e.value):Promise.resolve(e.value).then(s,l);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}){try{const{axios:o,cheerio:r}=t,n=(yield o.get(e)).data;let s=r.load(n);const l=[];if(s('a:contains("HubCloud")').map((e,t)=>{const o=s(t).parent().prev().text(),r=s(t).attr("href");r&&(o.includes("Ep")||o.includes("Download"))&&l.push({title:o.includes("Download")?"Play":o,link:r})}),0===l.length){const e=["hubcloud","gdflix"];let t="";s('h5 span[style*="color"], h5').each((o,r)=>{const n=s(r).text().trim();if(n&&(n.match(/\d{3,4}p/)||n.includes("Ep")||n.includes("Episode"))){t=n;let o=s(r).parent();for(let r=0;r<10&&(o=o.next(),o.length);r++)o.find("a[href]").each((o,r)=>{const n=s(r).attr("href");if(n&&e.some(e=>n.includes(e))){let e="Play";n.includes("hubcloud")?e="HubCloud":n.includes("gdflix")?e="GDFlix":n.includes("pixeldrain")?e="Pixeldrain":n.includes("fastdl")&&(e="FastDL");const o=t?`${t} - ${e}`:e;l.push({title:o,link:n})}})}})}return l.length>0?l:[{title:"Play",link:e}]}catch(t){return[{title:"Server 1",link:e}]}})},"getEpisodes");exports.getEpisodes=getEpisodes;