mirror of
https://github.com/iv-org/invidious.git
synced 2024-11-10 01:01:57 +01:00
change accept header globally - set it the same as youtube
This commit is contained in:
parent
ddd232a3a5
commit
13a8e9d425
2 changed files with 1 additions and 3 deletions
|
@ -3,7 +3,7 @@ def add_yt_headers(request)
|
||||||
request.headers["User-Agent"] ||= "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36"
|
request.headers["User-Agent"] ||= "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36"
|
||||||
|
|
||||||
request.headers["Accept-Charset"] ||= "ISO-8859-1,utf-8;q=0.7,*;q=0.7"
|
request.headers["Accept-Charset"] ||= "ISO-8859-1,utf-8;q=0.7,*;q=0.7"
|
||||||
request.headers["Accept"] ||= "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"
|
request.headers["Accept"] ||= "*"
|
||||||
request.headers["Accept-Language"] ||= "en-us,en;q=0.5"
|
request.headers["Accept-Language"] ||= "en-us,en;q=0.5"
|
||||||
|
|
||||||
# Preserve original cookies and add new YT consent cookie for EU servers
|
# Preserve original cookies and add new YT consent cookie for EU servers
|
||||||
|
|
|
@ -665,8 +665,6 @@ module YoutubeAPI
|
||||||
"x-goog-api-format-version" => "2",
|
"x-goog-api-format-version" => "2",
|
||||||
"x-youtube-client-name" => client_config.name_proto,
|
"x-youtube-client-name" => client_config.name_proto,
|
||||||
"x-youtube-client-version" => client_config.version,
|
"x-youtube-client-version" => client_config.version,
|
||||||
"accept" => "*",
|
|
||||||
"accept-language" => "*",
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if user_agent = client_config.user_agent
|
if user_agent = client_config.user_agent
|
||||||
|
|
Loading…
Reference in a new issue