mirror of
https://github.com/vega-org/vega-providers.git
synced 2026-06-17 20:28:37 +00:00
chore: update versions in manifest.json for 4khdHub and HdHub4u
fix: 4khdHub and HdHub4u
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user