From b0cd6587bdeac990f21e1568c073fefe69a63d19 Mon Sep 17 00:00:00 2001 From: Emilien Devos <4016501+unixfox@users.noreply.github.com> Date: Fri, 21 Jun 2024 23:17:22 +0200 Subject: [PATCH] retreive potoken for bypass restrictions Signed-off-by: Fijxu --- src/invidious/yt_backend/youtube_api.cr | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/invidious/yt_backend/youtube_api.cr b/src/invidious/yt_backend/youtube_api.cr index c8b037c8..7828fc72 100644 --- a/src/invidious/yt_backend/youtube_api.cr +++ b/src/invidious/yt_backend/youtube_api.cr @@ -285,6 +285,12 @@ module YoutubeAPI } of String => String | Int64, } + visitor_data = REDIS_DB.get("VISITORDATA") + + if visitor_data + client_context["client"]["visitorData"] = visitor_data + end + # Add some more context if it exists in the client definitions if !client_config.screen.empty? client_context["client"]["clientScreen"] = client_config.screen @@ -467,6 +473,9 @@ module YoutubeAPI "html5Preference": "HTML5_PREF_WANTS", }, }, + "serviceIntegrityDimensions" => { + "poToken": REDIS_DB.get("POTOKEN"), + }, } # Append the additional parameters if those were provided