fix: update HubDrive to HubCloud in meta and stream functions; bump version to 1.7 in manifest

This commit is contained in:
Himanshu
2026-01-18 14:45:24 +05:30
parent f3ef54c713
commit de86bd2476
5 changed files with 16 additions and 12 deletions

View File

@@ -38,9 +38,9 @@ export const getMeta = async function ({
.replace("\n", " ");
const link = $(element)
.find(".episode-links")
.find("a:contains('HubDrive')")
.find("a:contains('HubCloud')")
.attr("href");
console.log("title⭐", title, "link", link);
// console.log("title⭐", title, "link", link);
if (title && link) {
directLinks.push({ title, link });
}
@@ -60,7 +60,7 @@ export const getMeta = async function ({
.trim();
const link = $(element)
.find(".grid.grid-cols-2.gap-2")
.find("a:contains('HubDrive')")
.find("a:contains('HubCloud')")
.attr("href");
// console.log("title⭐", title, "link", link);
if (title && link) {

View File

@@ -31,13 +31,17 @@ export async function getStream({
const decodedString: any = decodeString(encryptedString);
link = atob(decodedString?.o);
const redirectLink = await getRedirectLinks(link, signal, headers);
console.log("redirectLink", redirectLink);
if (redirectLink.includes("hubcloud") || redirectLink.includes("/drive/")) {
return await hubcloudExtracter(redirectLink, signal);
}
const redirectLinkRes = await axios.get(redirectLink, { headers, signal });
const redirectLinkText = redirectLinkRes.data;
const $ = cheerio.load(redirectLinkText);
hubdriveLink =
$('h3:contains("1080p")').find("a").attr("href") ||
redirectLinkText.match(
/href="(https:\/\/hubcloud\.[^\/]+\/drive\/[^"]+)"/
/href="(https:\/\/hubcloud\.[^\/]+\/drive\/[^"]+)"/,
)[1];
if (hubdriveLink.includes("hubdrive")) {
const hubdriveRes = await axios.get(hubdriveLink, { headers, signal });
@@ -52,7 +56,7 @@ export async function getStream({
const hubcloudText = hubdriveLinkRes.data;
const hubcloudLink =
hubcloudText.match(
/<META HTTP-EQUIV="refresh" content="0; url=([^"]+)">/i
/<META HTTP-EQUIV="refresh" content="0; url=([^"]+)">/i,
)?.[1] || hubdriveLink;
try {
return await hubcloudExtracter(hubcloudLink, signal);
@@ -77,14 +81,14 @@ const pen = function (value: string) {
(_0x1a470e <= "Z" ? 90 : 122) >=
(_0x1a470e = _0x1a470e.charCodeAt(0) + 13)
? _0x1a470e
: _0x1a470e - 26
: _0x1a470e - 26,
);
});
};
const abortableTimeout = (
ms: number,
{ signal }: { signal?: AbortSignal } = {}
{ signal }: { signal?: AbortSignal } = {},
) => {
return new Promise((resolve, reject) => {
if (signal && signal.aborted) {
@@ -105,7 +109,7 @@ const abortableTimeout = (
export async function getRedirectLinks(
link: string,
signal: AbortSignal,
headers: any
headers: any,
) {
try {
const res = await fetch(link, { headers, signal });
@@ -160,7 +164,7 @@ function rot13(str: string) {
const isUpperCase = char <= "Z";
const baseCharCode = isUpperCase ? 65 : 97;
return String.fromCharCode(
((charCode - baseCharCode + 13) % 26) + baseCharCode
((charCode - baseCharCode + 13) % 26) + baseCharCode,
);
});
}