chore: update versions in manifest.json for 4khdHub and HdHub4u

fix: 4khdHub and HdHub4u
This commit is contained in:
Himanshu
2026-05-03 19:32:25 +05:30
parent 4a17b4fc9e
commit 80e687da6b
5 changed files with 30 additions and 8 deletions
+12 -2
View File
@@ -23,8 +23,10 @@ export async function getStream({
const res = await axios.get(link, { headers, signal });
const text = res.data;
const encryptedString = text.split("s('o','")?.[1]?.split("',180")?.[0];
const decodedString: any = decodeString(encryptedString);
link = atob(decodedString?.o);
const decodedString: any = decodeString(encryptedString) || link;
console.log("decodedString", decodedString);
link = safeAtob(decodedString?.o) || link;
console.log("Decoded link", link);
const redirectLink = await getRedirectLinks(link, signal, headers);
console.log("redirectLink", redirectLink);
if (redirectLink.includes("hubcloud") || redirectLink.includes("/drive/")) {
@@ -176,6 +178,14 @@ function rot13(str: string) {
});
}
const safeAtob = (str: string) => {
try {
return atob(str);
} catch (e) {
return null;
}
};
export function decodeString(encryptedString: string) {
try {
// First base64 decode
+14 -2
View File
@@ -13,6 +13,9 @@ export async function getStream({
}) {
const { axios, cheerio, commonHeaders: headers } = providerContext;
let hubdriveLink = "";
if (link.includes("hubcloud") || link.includes("/drive/")) {
return await hubcloudExtractor(link, signal, axios, cheerio, headers);
}
if (link.includes("hubdrive")) {
const hubdriveRes = await axios.get(link, { headers, signal });
const hubdriveText = hubdriveRes.data;
@@ -23,8 +26,8 @@ export async function getStream({
const res = await axios.get(link, { headers, signal });
const text = res.data;
const encryptedString = text.split("s('o','")?.[1]?.split("',180")?.[0];
const decodedString: any = decodeString(encryptedString);
link = atob(decodedString?.o);
const decodedString: any = decodeString(encryptedString) || link;
link = safeAtob(decodedString?.o) || link;
const redirectLink = await getRedirectLinks(link, signal, headers);
const redirectLinkRes = await axios.get(redirectLink, { headers, signal });
const redirectLinkText = redirectLinkRes.data;
@@ -45,6 +48,7 @@ export async function getStream({
console.log("hubdriveLink2", hubdriveLink);
}
let hubcloudLink = hubdriveLink;
console.log("hubdriveLink3", hubdriveLink);
try {
const hubdriveLinkRes = await axios.get(hubdriveLink, { headers, signal });
const hubcloudText = hubdriveLinkRes.data;
@@ -173,6 +177,14 @@ function rot13(str: string) {
});
}
const safeAtob = (str: string) => {
try {
return atob(str);
} catch (e) {
return null;
}
};
export function decodeString(encryptedString: string) {
try {
// First base64 decode