mirror of
https://git.nadeko.net/Fijxu/invidious.git
synced 2026-01-23 23:31:35 +00:00
Add ability to set po_token and visitordata ID (#4789)
This PR adds two new config option, to pass a PO token (config 'po_token') and a visitor ID (config 'visitor_data') to Youtube. These two strings are required to play videos using the WEB client. Warning: These strings gives much more identifiable information to Google! If the po_token setting is filled in, then the WEB client is used. If not, the Android client is used. TvHtml5ScreenEmbed will still be used as a fallback. Script for generating po_token and visitor_data: https://github.com/iv-org/youtube-trusted-session-generator Helps with issue 4734
This commit is contained in:
@@ -115,6 +115,7 @@ struct Video
|
||||
|
||||
n = DECRYPT_FUNCTION.try &.decrypt_nsig(params["n"])
|
||||
params["n"] = n if n
|
||||
params["pot"] = CONFIG.po_token if CONFIG.po_token
|
||||
|
||||
params["host"] = url.host.not_nil!
|
||||
if region = self.info["region"]?.try &.as_s
|
||||
|
||||
Reference in New Issue
Block a user