mirror of
https://github.com/vega-org/vega-providers.git
synced 2026-06-02 21:48:14 +00:00
chore: update versions in manifest.json for 4khdHub and HdHub4u
fix: 4khdHub and HdHub4u
This commit is contained in:
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
+2
-2
@@ -34,7 +34,7 @@
|
|||||||
{
|
{
|
||||||
"display_name": "4khdHub",
|
"display_name": "4khdHub",
|
||||||
"value": "4khdhub",
|
"value": "4khdhub",
|
||||||
"version": "2.0",
|
"version": "2.1",
|
||||||
"icon": "",
|
"icon": "",
|
||||||
"type": "global",
|
"type": "global",
|
||||||
"disabled": false
|
"disabled": false
|
||||||
@@ -170,7 +170,7 @@
|
|||||||
{
|
{
|
||||||
"display_name": "HdHub4u",
|
"display_name": "HdHub4u",
|
||||||
"value": "hdhub4u",
|
"value": "hdhub4u",
|
||||||
"version": "1.7",
|
"version": "1.8",
|
||||||
"icon": "",
|
"icon": "",
|
||||||
"type": "global",
|
"type": "global",
|
||||||
"disabled": false
|
"disabled": false
|
||||||
|
|||||||
@@ -23,8 +23,10 @@ export async function getStream({
|
|||||||
const res = await axios.get(link, { headers, signal });
|
const res = await axios.get(link, { headers, signal });
|
||||||
const text = res.data;
|
const text = res.data;
|
||||||
const encryptedString = text.split("s('o','")?.[1]?.split("',180")?.[0];
|
const encryptedString = text.split("s('o','")?.[1]?.split("',180")?.[0];
|
||||||
const decodedString: any = decodeString(encryptedString);
|
const decodedString: any = decodeString(encryptedString) || link;
|
||||||
link = atob(decodedString?.o);
|
console.log("decodedString", decodedString);
|
||||||
|
link = safeAtob(decodedString?.o) || link;
|
||||||
|
console.log("Decoded link", link);
|
||||||
const redirectLink = await getRedirectLinks(link, signal, headers);
|
const redirectLink = await getRedirectLinks(link, signal, headers);
|
||||||
console.log("redirectLink", redirectLink);
|
console.log("redirectLink", redirectLink);
|
||||||
if (redirectLink.includes("hubcloud") || redirectLink.includes("/drive/")) {
|
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) {
|
export function decodeString(encryptedString: string) {
|
||||||
try {
|
try {
|
||||||
// First base64 decode
|
// First base64 decode
|
||||||
|
|||||||
@@ -13,6 +13,9 @@ export async function getStream({
|
|||||||
}) {
|
}) {
|
||||||
const { axios, cheerio, commonHeaders: headers } = providerContext;
|
const { axios, cheerio, commonHeaders: headers } = providerContext;
|
||||||
let hubdriveLink = "";
|
let hubdriveLink = "";
|
||||||
|
if (link.includes("hubcloud") || link.includes("/drive/")) {
|
||||||
|
return await hubcloudExtractor(link, signal, axios, cheerio, headers);
|
||||||
|
}
|
||||||
if (link.includes("hubdrive")) {
|
if (link.includes("hubdrive")) {
|
||||||
const hubdriveRes = await axios.get(link, { headers, signal });
|
const hubdriveRes = await axios.get(link, { headers, signal });
|
||||||
const hubdriveText = hubdriveRes.data;
|
const hubdriveText = hubdriveRes.data;
|
||||||
@@ -23,8 +26,8 @@ export async function getStream({
|
|||||||
const res = await axios.get(link, { headers, signal });
|
const res = await axios.get(link, { headers, signal });
|
||||||
const text = res.data;
|
const text = res.data;
|
||||||
const encryptedString = text.split("s('o','")?.[1]?.split("',180")?.[0];
|
const encryptedString = text.split("s('o','")?.[1]?.split("',180")?.[0];
|
||||||
const decodedString: any = decodeString(encryptedString);
|
const decodedString: any = decodeString(encryptedString) || link;
|
||||||
link = atob(decodedString?.o);
|
link = safeAtob(decodedString?.o) || link;
|
||||||
const redirectLink = await getRedirectLinks(link, signal, headers);
|
const redirectLink = await getRedirectLinks(link, signal, headers);
|
||||||
const redirectLinkRes = await axios.get(redirectLink, { headers, signal });
|
const redirectLinkRes = await axios.get(redirectLink, { headers, signal });
|
||||||
const redirectLinkText = redirectLinkRes.data;
|
const redirectLinkText = redirectLinkRes.data;
|
||||||
@@ -45,6 +48,7 @@ export async function getStream({
|
|||||||
console.log("hubdriveLink2", hubdriveLink);
|
console.log("hubdriveLink2", hubdriveLink);
|
||||||
}
|
}
|
||||||
let hubcloudLink = hubdriveLink;
|
let hubcloudLink = hubdriveLink;
|
||||||
|
console.log("hubdriveLink3", hubdriveLink);
|
||||||
try {
|
try {
|
||||||
const hubdriveLinkRes = await axios.get(hubdriveLink, { headers, signal });
|
const hubdriveLinkRes = await axios.get(hubdriveLink, { headers, signal });
|
||||||
const hubcloudText = hubdriveLinkRes.data;
|
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) {
|
export function decodeString(encryptedString: string) {
|
||||||
try {
|
try {
|
||||||
// First base64 decode
|
// First base64 decode
|
||||||
|
|||||||
Reference in New Issue
Block a user