fix: update getStream function to directly use hubcloudExtracter with axios and cheerio

This commit is contained in:
Himanshu
2025-12-14 17:07:22 +05:30
parent 28eeb51898
commit 6eea0bc10f
2 changed files with 4 additions and 4 deletions

View File

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