[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:
Markus Heiser
2026-05-25 17:05:08 +02:00
committed by GitHub
parent 89b89a88fe
commit e29e861e2c
5 changed files with 13 additions and 19 deletions
+2 -4
View File
@@ -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):