1
0
mirror of https://github.com/searxng/searxng.git synced 2024-11-08 06:10:10 +01:00
searxng/searx
Marc Abonce Seguin 9b6ffed061 fix fetch_languages for bing
Bing has a list of regions that it supports and some of these regions
may have more than one possible language.

In some cases, like Switzerland, these languages are always shown as
options, so there is no issue. But in other cases, like Andorra, Bing
will only show one language at the time, either the region's default or
the request's language if the latter is supported by that region.

For example, if the HTTP request is in French, Andorra will appear as
fr-AD but if the same page is requested in any other language Andorra
will appear as ca-AD.

This is specially a problem when Bing assumes that the request is in
English because it overrides enough language codes to make several major
languages like Arabic dissappear from the languages.py file.

To avoid that issue, I set the Accept-Language header to a language
that's only supported in one region to hopefully avoid these overrides.
2021-02-25 23:51:49 -07:00
..
answerers Drop Python 2 (4/n): SearchQuery.query is a str instead of bytes 2020-09-10 10:49:42 +02:00
data [mod] add utils/fetch_external_bangs.py 2021-02-24 18:48:36 +01:00
engines fix fetch_languages for bing 2021-02-25 23:51:49 -07:00
metrology [fix] checker: fix engine statistics 2021-01-18 08:19:44 +01:00
plugins [mod] pylint: numerous minor code fixes 2020-12-01 15:21:19 +01:00
search [mod] update currencies.json and fetch_currencies.py 2021-02-23 16:42:28 +01:00
shared [fix] checker: don't run the checker when uwsgi is not properly configured 2021-01-13 14:07:39 +01:00
static [mod] themes: remove legacy, courgette and pix-art themes 2020-12-17 11:33:28 +01:00
templates Merge pull request #2458 from MarcAbonce/hide-links-mobile2 2021-01-12 08:27:24 +01:00
translations [enh] update translations 2020-07-09 15:15:52 +02:00
__init__.py [mod] settings.yml: move brand settings to a dedicated section 2021-01-11 22:59:52 +01:00
autocomplete.py [fix] dbpedia autocomplete (and use HTTPS) 2020-12-04 16:47:43 +01:00
exceptions.py [enh] add raise_for_httperror 2020-12-11 14:37:08 +01:00
external_bang.py [mod] add utils/fetch_external_bangs.py 2021-02-24 18:48:36 +01:00
external_urls.py [mod] add external_urls.json and wikidata_units.json 2020-10-28 08:09:25 +01:00
languages.py [data] make engines.languages 2021-01-24 09:52:32 +01:00
poolrequests.py [mod] poolrequests: for one (user request, engine) always use the same HTTPAdapter 2021-02-09 14:33:36 +01:00
preferences.py Patch advanced search preferences 2020-11-23 19:13:29 +01:00
query.py fix empty colon in query from selecting Chinese 2021-01-09 22:11:41 -07:00
raise_for_httperror.py [enh] add raise_for_httperror 2020-12-11 14:37:08 +01:00
results.py [mod] results: don't crash when an engine don't have a category 2020-12-10 10:57:07 +01:00
settings_loader.py [fix] pylint: use "raise ... from ..." 2020-12-20 09:46:53 +01:00
settings_robot.yml Let admins lock user preferences 2020-10-25 18:06:18 +01:00
settings.yml Added rumble.com video search engine. TODO video embedding. 2021-02-20 12:48:56 +00:00
testing.py Drop Python 2 (1/n): remove unicode string and url_utils 2020-09-10 10:39:04 +02:00
utils.py [fix] pylint: use "raise ... from ..." 2020-12-20 09:46:53 +01:00
version.py prepare release 0.18.0 2020-12-14 19:03:09 +01:00
webadapter.py [fix] pylint: use "raise ... from ..." 2020-12-20 09:46:53 +01:00
webapp.py [fix] get correct locale with country from browser 2021-02-04 19:53:59 -07:00
webutils.py Updated webutils.highlight_content to ignore double-quotes when highlighting query parts 2021-02-08 23:58:54 -05:00