[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
@@ -44,7 +44,7 @@ time_map = {
difference of *last day* and *last week* in the result list is just marginally.
Bing does not have news range ``year`` / we use ``month`` instead."""
base_url = "https://www.bing.com/news/infinitescrollajax"
base_url = "https://www.bing.com"
"""Bing (News) search URL"""
@@ -74,9 +74,7 @@ def request(query, params):
if params["time_range"]:
query_params["qft"] = time_map.get(params["time_range"], 'interval="9"')
params["url"] = base_url + "?" + urlencode(query_params)
return params
params["url"] = base_url + "/news/infinitescrollajax?" + urlencode(query_params)
def response(resp):