mirror of
https://github.com/searxng/searxng.git
synced 2024-11-26 12:51:02 +00:00
Merge pull request #10 from return42/fix-youtube
[fix] youtube - send CONSENT Cookie to not be redirected
This commit is contained in:
commit
981cdb7acf
1 changed files with 2 additions and 0 deletions
|
@ -3,6 +3,7 @@
|
|||
Youtube (Videos)
|
||||
"""
|
||||
|
||||
from datetime import datetime
|
||||
from functools import reduce
|
||||
from json import loads, dumps
|
||||
from urllib.parse import quote_plus
|
||||
|
@ -56,6 +57,7 @@ def request(query, params):
|
|||
})
|
||||
params['headers']['Content-Type'] = 'application/json'
|
||||
|
||||
params['headers']['Cookie'] = "CONSENT=YES+cb.%s-17-p0.en+F+941;" % datetime.now().strftime("%Y%m%d")
|
||||
return params
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue