This commit is contained in:
himanshu8443
2025-07-11 19:17:23 +05:30
parent 6ca69cf93b
commit 13f71510d5
139 changed files with 139 additions and 10578 deletions

View File

@@ -1,35 +1 @@
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.getStream = getStream;
function getStream(_a) {
return __awaiter(this, arguments, void 0, function* ({ link, signal, providerContext, }) {
const { axios, cheerio, commonHeaders: headers } = providerContext;
const res = yield axios.get(link, { headers, signal });
const html = res.data;
const $ = cheerio.load(html);
const Streams = [];
// Find the actual .mp4 download link
let downloadLink = null;
$('a:contains("Fast Download Server")').each((i, el) => {
const href = $(el).attr("href");
if (href && href.toLocaleLowerCase().includes(".mp4")) {
Streams.push({
link: href,
type: "mp4",
server: "Fast Download",
headers: headers,
});
}
});
return Streams;
});
}
"use strict";var __awaiter=this&&this.__awaiter||function(e,t,n,a){return new(n||(n=Promise))(function(r,o){function i(e){try{c(a.next(e))}catch(e){o(e)}}function s(e){try{c(a.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(i,s)}c((a=a.apply(e,t||[])).next())})};function getStream(e){return __awaiter(this,arguments,void 0,function*({link:e,signal:t,providerContext:n}){const{axios:a,cheerio:r,commonHeaders:o}=n,i=(yield a.get(e,{headers:o,signal:t})).data,s=r.load(i),c=[];return s('a:contains("Fast Download Server")').each((e,t)=>{const n=s(t).attr("href");n&&n.toLocaleLowerCase().includes(".mp4")&&c.push({link:n,type:"mp4",server:"Fast Download",headers:o})}),c})}Object.defineProperty(exports,"__esModule",{value:!0}),exports.getStream=getStream;