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 { ProviderContext, Stream } from "../types";
import { hubcloudExtractor } from "../extractors/hubcloud";
const headers = {
accept:
@@ -30,7 +29,8 @@ export async function getStream({
signal: AbortSignal;
providerContext: ProviderContext;
}) {
const { axios, cheerio, commonHeaders } = providerContext;
const { axios, cheerio, extractors } = providerContext;
const { hubcloudExtracter } = extractors;
try {
const streamLinks: Stream[] = [];
console.log("dotlink", link);
@@ -47,7 +47,7 @@ export async function getStream({
try {
const $ = cheerio.load(dotlinkText);
const filepressLink = $(
'.btn.btn-sm.btn-outline[style="background:linear-gradient(135deg,rgb(252,185,0) 0%,rgb(0,0,0)); color: #fdf8f2;"]',
'.btn.btn-sm.btn-outline[style="background:linear-gradient(135deg,rgb(252,185,0) 0%,rgb(0,0,0)); color: #fdf8f2;"]'
)
.parent()
.attr("href");
@@ -71,7 +71,7 @@ export async function getStream({
"Content-Type": "application/json",
Referer: filepressBaseUrl,
},
},
}
);
// console.log('filepressTokenRes', filepressTokenRes.data);
if (filepressTokenRes.data?.status) {
@@ -88,7 +88,7 @@ export async function getStream({
"Content-Type": "application/json",
Referer: filepressBaseUrl,
},
},
}
);
// console.log('filepressStreamLink', filepressStreamLink.data);
streamLinks.push({
@@ -103,7 +103,7 @@ export async function getStream({
}
}
return await hubcloudExtractor(link, signal, axios, cheerio, commonHeaders);
return await hubcloudExtracter(link, signal);
} catch (error: any) {
console.log("getStream error: ", error);
if (error.message.includes("Aborted")) {