diff options
Diffstat (limited to 'searx')
| -rw-r--r-- | searx/engines/bing.py | 4 | ||||
| -rw-r--r-- | searx/sxng_locales.py | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/searx/engines/bing.py b/searx/engines/bing.py index da76f771e..47e8bb66d 100644 --- a/searx/engines/bing.py +++ b/searx/engines/bing.py @@ -223,7 +223,7 @@ def fetch_traits(engine_traits: EngineTraits): 'da': 'dk', # da --> da-dk } - for href in eval_xpath(dom, '//div[@id="language-section"]//li/a/@href'): + for href in eval_xpath(dom, '//div[@id="language-section-content"]//div[@class="languageItem"]/a/@href'): eng_lang = parse_qs(urlparse(href).query)['setlang'][0] babel_lang = map_lang.get(eng_lang, eng_lang) try: @@ -253,7 +253,7 @@ def fetch_traits(engine_traits: EngineTraits): map_market_codes = { 'zh-hk': 'en-hk', # not sure why, but at M$ this is the market code for Hongkong } - for href in eval_xpath(dom, '//div[@id="region-section"]//li/a/@href'): + for href in eval_xpath(dom, '//div[@id="region-section-content"]//div[@class="regionItem"]/a/@href'): cc_tag = parse_qs(urlparse(href).query)['cc'][0] if cc_tag == 'clear': engine_traits.all_locale = cc_tag diff --git a/searx/sxng_locales.py b/searx/sxng_locales.py index 2ff2b2cd6..34b72bf02 100644 --- a/searx/sxng_locales.py +++ b/searx/sxng_locales.py @@ -1,5 +1,5 @@ # SPDX-License-Identifier: AGPL-3.0-or-later -'''List of SearXNG's locale codes. +'''List of SearXNG's locale codes used for the search language/region. .. hint:: |