mirror of
https://github.com/searxng/searxng.git
synced 2026-06-02 07:57:16 +02:00
[fix] bilibili engine: fix Referer and add Accept HTTP header (#6189)
This commit is contained in:
@@ -51,11 +51,10 @@ def request(query, params):
|
|||||||
}
|
}
|
||||||
|
|
||||||
params["url"] = f"{base_url}?{urlencode(query_params)}"
|
params["url"] = f"{base_url}?{urlencode(query_params)}"
|
||||||
params["headers"]["Referer"] = "https://www.bilibili.com"
|
params["headers"]["Referer"] = "https://www.bilibili.com/"
|
||||||
|
params["headers"]["Accept"] = "application/json, text/javascript, */*; q=0.01"
|
||||||
params["cookies"] = cookie
|
params["cookies"] = cookie
|
||||||
|
|
||||||
return params
|
|
||||||
|
|
||||||
|
|
||||||
def response(resp):
|
def response(resp):
|
||||||
search_res = resp.json()
|
search_res = resp.json()
|
||||||
|
|||||||
Reference in New Issue
Block a user