This commit is contained in:
himanshu8443
2025-06-16 22:26:38 +05:30
parent 3f3e12f5df
commit 2a4aa2a680
185 changed files with 4645 additions and 3952 deletions

View File

@@ -0,0 +1,43 @@
import { Stream, ProviderContext } from "../types";
import * as cheerio from "cheerio";
export const getStream = async function ({
link: id,
// type,
signal,
providerContext,
}: {
link: string;
type: string;
signal: AbortSignal;
providerContext: ProviderContext;
}): Promise<Stream[]> {
try {
const { axios } = providerContext;
const stream: Stream[] = [];
const [, epId] = id.split("&");
const url = `https://febbox.vercel.app/api/video-quality?fid=${epId}`;
const res = await axios.get(url, { signal });
const data = res.data;
const $ = cheerio.load(data.html);
$(".file_quality").each((i, el) => {
const server =
$(el).find("p.name").text() +
" - " +
$(el).find("p.size").text() +
" - " +
$(el).find("p.speed").text();
const link = $(el).attr("data-url");
if (link) {
stream.push({
server: server,
type: "mkv",
link: link,
});
}
});
return stream;
} catch (err) {
return [];
}
};