From 4bbecc636c26b77dd56779592bedce4a89233c3f Mon Sep 17 00:00:00 2001 From: Megalodon-sharky <64089579+Megalodon-sharky@users.noreply.github.com> Date: Thu, 24 Jun 2021 12:30:06 +0530 Subject: [PATCH] This fixes my issues. --- lib/info.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/info.js b/lib/info.js index 417f8761..c728632e 100644 --- a/lib/info.js +++ b/lib/info.js @@ -251,7 +251,7 @@ const parseJSON = (source, varName, json) => { const findJSON = (source, varName, body, left, right, prependJSON) => { - let jsonStr = utils.between(body, left, right); + let jsonStr = body.split("ytInitialPlayerResponse = {")[1].split("}}};")[0] += "}}}"; if (!jsonStr) { throw Error(`Could not find ${varName} in ${source}`); }