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

This reverts commit ef46918fec.
This commit is contained in:
Himanshu
2026-02-03 21:42:43 +05:30
parent ef46918fec
commit 8c91327af1
220 changed files with 1300 additions and 771 deletions

View File

@@ -1,4 +1,5 @@
import { ProviderContext, Stream } from "../types";
import { hubcloudExtractor } from "../extractors/hubcloud";
const headers = {
Accept:
@@ -32,13 +33,12 @@ export async function getStream({
signal: AbortSignal;
providerContext: ProviderContext;
}) {
const { axios, cheerio, extractors } = providerContext;
const { hubcloudExtracter } = extractors;
const { axios, cheerio, commonHeaders } = providerContext;
try {
const streamLinks: Stream[] = [];
console.log("dotlink", link);
return await hubcloudExtracter(link, signal);
return await hubcloudExtractor(link, signal, axios, cheerio, commonHeaders);
} catch (error: any) {
console.log("getStream error: ", error);
if (error.message.includes("Aborted")) {