mirror of
https://github.com/searxng/searxng.git
synced 2024-12-23 09:46:31 +00:00
bing_news: parital rollback of c89c05bc
The bing_news bug (discussed in #1838) was caused by wrong language tags, which
was fixed e0c99d9d
/ no need to change the bing_news search string.
closes: https://github.com/asciimoo/searx/issues/1838
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
parent
79412828cd
commit
1c853f9573
2 changed files with 2 additions and 2 deletions
|
@ -120,7 +120,7 @@ def _fetch_supported_languages(resp):
|
||||||
href = eval_xpath(a, './@href')[0]
|
href = eval_xpath(a, './@href')[0]
|
||||||
match = setmkt.search(href)
|
match = setmkt.search(href)
|
||||||
l_tag = match.groups()[0]
|
l_tag = match.groups()[0]
|
||||||
_lang, _nation = l_tag.split('-',1)
|
_lang, _nation = l_tag.split('-', 1)
|
||||||
l_tag = _lang.lower() + '-' + _nation.upper()
|
l_tag = _lang.lower() + '-' + _nation.upper()
|
||||||
lang_tags.add(l_tag)
|
lang_tags.add(l_tag)
|
||||||
|
|
||||||
|
|
|
@ -61,7 +61,7 @@ def _get_url(query, language, offset, time_range):
|
||||||
else:
|
else:
|
||||||
# e.g. setmkt=de-de&setlang=de
|
# e.g. setmkt=de-de&setlang=de
|
||||||
search_path = search_string.format(
|
search_path = search_string.format(
|
||||||
query=urlencode({'q': query, 'setlang': language}),
|
query=urlencode({'q': query, 'setmkt': language}),
|
||||||
offset=offset)
|
offset=offset)
|
||||||
return base_url + search_path
|
return base_url + search_path
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue