Revert "feat: add extractors bundled in file refactor stream handling in multiple providers"

This reverts commit 13d41f9da6.
This commit is contained in:
Himanshu
2026-02-02 23:44:25 +05:30
parent 13d41f9da6
commit ef46918fec
220 changed files with 771 additions and 1300 deletions

View File

@@ -1,5 +1,4 @@
import { Stream, ProviderContext } from "../types";
import { gdflixExtractor } from "../extractors/gdflix";
export const getStream = async function ({
link,
@@ -11,23 +10,19 @@ export const getStream = async function ({
signal: AbortSignal;
providerContext: ProviderContext;
}): Promise<Stream[]> {
const { axios, cheerio, commonHeaders: headers } = providerContext;
try {
const res = await axios.get(link, { signal });
const res = await providerContext.axios.get(link, { signal });
const data = res.data;
const $ = cheerio.load(data);
const $ = providerContext.cheerio.load(data);
const streams: Stream[] = [];
const elements = $(".button2,.button1,.button3,.button4,.button").toArray();
const promises = elements.map(async (element) => {
const title = $(element).text();
let link = $(element).attr("href");
if (title.includes("GDFLIX") && link) {
const gdLinks = await gdflixExtractor(
const gdLinks = await providerContext.extractors.gdFlixExtracter(
link,
signal,
axios,
cheerio,
headers,
signal
);
streams.push(...gdLinks);
}