mirror of
https://github.com/searxng/searxng.git
synced 2026-06-04 08:57:17 +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:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user