fix update patch potoken

This commit is contained in:
Emilien Devos
2024-06-22 00:41:02 +02:00
parent a9eabf44e9
commit ab2102711b
+10 -12
View File
@@ -1,14 +1,14 @@
From e6aa46551f363efef637e39550d85e54e612e12f Mon Sep 17 00:00:00 2001
From 48a625b4a43930e98b07134c39899ea9d84e8a44 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 1/1] retreive potoken for bypass restrictions
---
src/invidious/yt_backend/youtube_api.cr | 11 +++++++++++
1 file changed, 11 insertions(+)
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 727ce9a3..3eea424b 100644
index 727ce9a3..b1c2c288 100644
--- a/src/invidious/yt_backend/youtube_api.cr
+++ b/src/invidious/yt_backend/youtube_api.cr
@@ -306,6 +306,12 @@ module YoutubeAPI
@@ -24,18 +24,16 @@ index 727ce9a3..3eea424b 100644
# Add some more context if it exists in the client definitions
if !client_config.screen.empty?
client_context["client"]["clientScreen"] = client_config.screen
@@ -490,6 +496,11 @@ module YoutubeAPI
@@ -488,6 +494,9 @@ module YoutubeAPI
"html5Preference": "HTML5_PREF_WANTS",
},
},
+ "serviceIntegrityDimensions" => {
+ "poToken": REDIS_DB.get("POTOKEN"),
+ },
}
+ po_token = REDIS_DB.get("POTOKEN")
+ if po_token
+ data["serviceIntegrityDimensions"]["poToken"] = po_token
+ end
+
# Append the additional parameters if those were provided
if params != ""
data["params"] = params
--
2.45.2