Invidious is an alternative front-end to YouTube
revert: remove 'JSON.parse("'
Théo Gaillardb41ca72d2b85
diff --git a/src/invidious/helpers/helpers.cr b/src/invidious/helpers/helpers.crindex 5e4cd4ef..7a0cb3d3 100644--- a/src/invidious/helpers/helpers.cr+++ b/src/invidious/helpers/helpers.cr@@ -598,7 +598,7 @@ def create_notification_stream(env, topics, connection_channel)enddef extract_initial_data(body) : Hash(String, JSON::Any)- return JSON.parse(body.match(/(window\["ytInitialData"\]|var\s*ytInitialData)\s*=\s*(?<info>\{.*?\});/m).try &.["info"] || "{}").as_h+ return JSON.parse(body.match(/(window\["ytInitialData"\]|var\s*ytInitialData)\s*=\s*(JSON\.parse\(")?(?<info>\{.*?\})("\))?;/m).try &.["info"] || "{}").as_henddef proxy_file(response, env)