From f1d8361b76fc40e05bb1d6e31014fcf99f6132fe Mon Sep 17 00:00:00 2001 From: Adailton Nascimento Date: Tue, 27 Feb 2024 02:10:15 -0300 Subject: [PATCH] fix(vidcloud): extract url source (#478) bugfix: extract url source at flixhq Closes #569 Co-authored-by: Adailton Nascimento --- src/extractors/vidcloud.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/extractors/vidcloud.ts b/src/extractors/vidcloud.ts index 5195a51f8..37ede8df8 100644 --- a/src/extractors/vidcloud.ts +++ b/src/extractors/vidcloud.ts @@ -37,9 +37,8 @@ class VidCloud extends VideoExtractor { if (!isJson(res.data.sources)) { const keys = await (await this.client.get('https://raw.githubusercontent.com/eatmynerds/key/e4/key.txt')).data; - const keyString = btoa(String.fromCharCode.apply(null, Array.from(new Uint8Array(JSON.parse(keys))))); - const decryptedVal = CryptoJS.AES.decrypt(res.data.sources, keyString).toString(CryptoJS.enc.Utf8); - sources = JSON.parse(CryptoJS.AES.decrypt(res.data.sources, keyString).toString(CryptoJS.enc.Utf8)); + const keyString = btoa(String.fromCharCode.apply(null, Array.from(new Uint8Array(JSON.parse(JSON.stringify(keys)))))); + const decryptedVal = CryptoJS.AES.decrypt(res.data.sources, keyString).toString(CryptoJS.enc.Utf8); sources = isJson(decryptedVal) ? JSON.parse(decryptedVal) : res.data.sources; }