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 { Stream, ProviderContext } from "../types";
import { gofileExtractor } from "../extractors/gofile";
function LALLJLutmoZpvvbikjaWM(str: string): ArrayBuffer {
var buf = new ArrayBuffer(str.length * 2);
@@ -23,13 +24,7 @@ export const getStream = async function ({
link: string;
providerContext: ProviderContext;
}): Promise<Stream[]> {
const {
axios,
cheerio,
commonHeaders: headers,
extractors,
} = providerContext;
const { gofileExtracter } = extractors;
const { axios, cheerio, commonHeaders: headers } = providerContext;
function generateMessageToken(baseUrlL: string): string {
const hostname = baseUrlL?.replace(/https?:\/\//, "").split("/")[0];
console.log("generateMessageToken hostname", hostname);
@@ -170,14 +165,15 @@ export const getStream = async function ({
id: idData,
});
console.log("idData", idData);
})
}),
);
await Promise.all(
secondIdList.map(async (id) => {
const idRes = await axios.post(`${baseUrl}/tmp/${id.id}`);
if (idRes.data.ppd["gofile.io"]) {
const goRes = await gofileExtracter(
idRes.data.ppd["gofile.io"].link.split("/").pop()
const goRes = await gofileExtractor(
idRes.data.ppd["gofile.io"].link.split("/").pop(),
axios,
);
console.log("link", goRes.link);
if (goRes.link) {
@@ -194,7 +190,7 @@ export const getStream = async function ({
});
}
}
})
}),
);
return streamLinks;