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

This commit is contained in:
Himanshu
2026-02-02 23:24:38 +05:30
parent 2183412dc8
commit 13d41f9da6
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,10 +33,15 @@ export async function getStream({
signal: AbortSignal;
providerContext: ProviderContext;
}) {
const { extractors } = providerContext;
const { hubcloudExtracter } = extractors;
const { axios, cheerio, commonHeaders } = providerContext;
try {
const hubcloudLink = await hubcloudExtracter(link, signal);
const hubcloudLink = await hubcloudExtractor(
link,
signal,
axios,
cheerio,
commonHeaders,
);
return hubcloudLink;
} catch (error: any) {