mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2022-03-16.git
synced 2024-08-15 00:53:18 +00:00
Vary user-agent
This commit is contained in:
parent
6930570fa2
commit
e05a25d701
2 changed files with 1587 additions and 1 deletions
|
@ -95,7 +95,10 @@ class HTTPClient < HTTP::Client
|
|||
if self.host == "www.youtube.com"
|
||||
request.headers["x-youtube-client-name"] ||= "1"
|
||||
request.headers["x-youtube-client-version"] ||= "1.20180719"
|
||||
request.headers["user-agent"] ||= "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36"
|
||||
request.headers["user-agent"] ||= random_user_agent
|
||||
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-language"] ||= "en-us,en;q=0.5"
|
||||
end
|
||||
|
||||
super
|
||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue