mirror of
https://github.com/searxng/searxng.git
synced 2026-06-02 07:57:16 +02:00
[fix] bing engines - geoblocking in China (#6134)
In regions like China, the domain must be adjusted to avoid a redirect. - https://github.com/searxng/searxng/issues/5243 - https://github.com/searxng/searxng/pull/5324 - https://github.com/searxng/searxng/pull/6133 Suggested / tested by @hubutui in https://github.com/searxng/searxng/pull/6133#issuecomment-4534637069 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
@@ -34,7 +34,7 @@ time_map = {
|
||||
"year": 60 * 24 * 365,
|
||||
}
|
||||
|
||||
base_url = "https://www.bing.com/images/async"
|
||||
base_url = "https://www.bing.com"
|
||||
"""Bing-Image search URL"""
|
||||
|
||||
|
||||
@@ -64,9 +64,7 @@ def request(query, params):
|
||||
if params["time_range"]:
|
||||
query_params["qft"] = "filterui:age-lt%s" % time_map[params["time_range"]]
|
||||
|
||||
params["url"] = base_url + "?" + urlencode(query_params)
|
||||
|
||||
return params
|
||||
params["url"] = base_url + "/images/async?" + urlencode(query_params)
|
||||
|
||||
|
||||
def response(resp):
|
||||
|
||||
Reference in New Issue
Block a user