forked from zaclys/searxng
Merge pull request #10 from return42/fix-youtube
[fix] youtube - send CONSENT Cookie to not be redirected
This commit is contained in:
commit
981cdb7acf
|
@ -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 New Issue