"use strict";var __awaiter=this&&this.__awaiter||function(t,e,n,o){return new(n||(n=Promise))(function(i,r){function s(t){try{c(o.next(t))}catch(t){r(t)}}function a(t){try{c(o.throw(t))}catch(t){r(t)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(s,a)}c((o=o.apply(t,e||[])).next())})};Object.defineProperty(exports,"__esModule",{value:!0}),exports.getEpisodes=void 0;const getEpisodes=function(t){return __awaiter(this,arguments,void 0,function*({url:t,providerContext:e}){try{const{axios:n,cheerio:o}=e,i=(yield n.get(t)).data;let r=o.load(i);const s=[];return r('a:contains("HubCloud")').map((t,e)=>{const n=r(e).parent().prev().text(),o=r(e).attr("href");o&&(n.includes("Ep")||n.includes("Download"))&&s.push({title:n.includes("Download")?"Play":n,link:o})}),s}catch(e){return[{title:"Server 1",link:t}]}})};exports.getEpisodes=getEpisodes;