searxng/searx
Alexandre Flament 1c67b6aece [enh] google engine: supports "default language"
Same behaviour behaviour than Whoogle [1].  Only the google engine with the
"Default language" choice "(all)"" is changed by this patch.

When searching for a locate place, the result are in the expect language,
without missing results [2]:

  > When a language is not specified, the language interpretation is left up to
  > Google to decide how the search results should be delivered.

The query parameters are copied from Whoogle.  With the ``all`` language:

- add parameter ``source=lnt``
- don't use parameter ``lr``
- don't add a ``Accept-Language`` HTTP header.

The new signature of function ``get_lang_info()`` is:

    lang_info = get_lang_info(params, lang_list, custom_aliases, supported_any_language)

Argument ``supported_any_language`` is True for google.py and False for the other
google engines.  With this patch the function now returns:

- query parameters: ``lang_info['params']``
- HTTP headers: ``lang_info['headers']``
- and as before this patch:
  - ``lang_info['subdomain']``
  - ``lang_info['country']``
  - ``lang_info['language']``

[1] https://github.com/benbusby/whoogle-search
[2] https://github.com/benbusby/whoogle-search/releases/tag/v0.5.4
2021-06-10 10:22:01 +02:00
..
answerers [fix] answers: don't crash when the query is an empty string 2021-03-01 10:52:39 +01:00
data [pylint] searx/data/__init__.py 2021-06-09 18:08:23 +02:00
engines [enh] google engine: supports "default language" 2021-06-10 10:22:01 +02:00
metrics [refactor] metrics.get_reliabilities() - make code more readable 2021-05-22 15:17:18 +02:00
network [mod] move all default settings into searx.settings_defaults 2021-06-01 08:10:15 +02:00
plugins [mod] move all default settings into searx.settings_defaults 2021-06-01 08:10:15 +02:00
raise_for_httperror [enh] rewrite and enhance metrics 2021-04-21 16:24:46 +02:00
search [fix] typo: online_dictionnary --> online_dictionary 2021-06-04 15:05:58 +02:00
shared [fix] checker: don't run the checker when uwsgi is not properly configured 2021-01-13 14:07:39 +01:00
static [static] make themes.all - based on commit 12af3b39 2021-06-10 09:20:51 +02:00
templates [fix] make simple/result_templates/map.html more CSP compliant [1] 2021-06-09 18:08:23 +02:00
translations [enh] update translations from transifex 2021-03-27 19:10:54 +01:00
__init__.py [mod] move hook to set Unix thread name into searx.unixthreadname 2021-06-08 15:54:11 +02:00
autocomplete.py [httpx] replace searx.poolrequests by searx.network 2021-04-12 17:25:56 +02:00
exceptions.py
external_bang.py [mod] add utils/fetch_external_bangs.py 2021-02-24 18:48:36 +01:00
external_urls.py [enh] openstreetmap / map template: improve results 2021-06-09 18:08:23 +02:00
flaskfix.py [mod] refactor: move Flask proxy fix to searx.flaskfix module 2021-06-08 15:54:11 +02:00
languages.py Update searx.data - update_languages.py 2021-03-05 10:56:46 +00:00
preferences.py [mod] move all default settings into searx.settings_defaults 2021-06-01 08:10:15 +02:00
query.py [enh] autocomplete refactoring, autocomplete on external bangs 2021-03-01 19:12:32 +01:00
results.py [fix] offline engine: don't crash on time recording 2021-05-22 15:17:18 +02:00
settings_defaults.py [pylint] searx/__init__.py & searx/settings_defaults.py 2021-06-01 16:03:19 +02:00
settings_loader.py [fix] unit test: don't load /etc/searx/settings.yml 2021-05-18 17:23:21 +02:00
settings_robot.yml [yamllint] searx/settings_robot.yml 2021-06-05 17:41:24 +02:00
settings.yml [yamllint] searx/settings.yml 2021-06-05 17:41:24 +02:00
testing.py Bump pylint from 2.7.4 to 2.8.2 2021-05-03 15:45:30 +02:00
unixthreadname.py [mod] move hook to set Unix thread name into searx.unixthreadname 2021-06-08 15:54:11 +02:00
utils.py [fix] strip spaces from searx user agent 2021-06-09 18:08:23 +02:00
version.py [enh] release v1.0.0 2021-03-27 20:30:08 +01:00
webadapter.py [enh] add ability to send engine data to subsequent requests 2021-03-06 12:12:35 +01:00
webapp.py [mod] refactor searx.webapp.render 2021-06-08 15:54:11 +02:00
webutils.py [mod] move all default settings into searx.settings_defaults 2021-06-01 08:10:15 +02:00