searxngRebrandZaclys/searx
Markus Heiser c80e82a855 [mod] DuckDuckGo: reversed engineered & upgrade to data_type: traits_v1
Partial reverse engineering of the DuckDuckGo (DDG) engines including a
improved language and region handling based on the enigne.traits_v1 data.

- DDG Lite
- DDG Instant Answer API
- DDG Images
- DDG Weather

docs/src/searx.engine.duckduckgo.rst:
  Online documentation of the DDG engines (make docs.live)

searx/data/engine_traits.json
  Add data type "traits_v1" generated by the fetch_traits() functions from:

  - "duckduckgo" (WEB),
  - "duckduckgo images" and
  - "duckduckgo weather"

  and remove data from obsolete data type "supported_languages".

searx/autocomplete.py:
  Reversed engineered Autocomplete from DDG.  Supports DDG's languages.

searx/engines/duckduckgo.py:
  - fetch_traits():  Fetch languages & regions from DDG.

  - get_ddg_lang(): Get DDG's language identifier from SearXNG's locale.  DDG
    defines its languages by region codes.  DDG-Lite does not offer a language
    selection to the user, only a region can be selected by the user.

  - Cache ``vqd`` value: The vqd value depends on the query string and is needed
    for the follow up pages or the images loaded by a XMLHttpRequest (DDG
    images).  The ``vqd`` value of a search term is stored for 10min in the
    redis DB.

  - DDG Lite engine: reversed engineered request method with improved Language
    and region support and better ``vqd`` handling.

searx/engines/duckduckgo_definitions.py: DDG Instant Answer API
  The *instant answers* API does not support languages, or at least we could not
  find out how language support should work.  It seems that most of the features
  are based on English terms.

searx/engines/duckduckgo_images.py: DDG Images
  Reversed engineered request method.  Improved language and region handling
  based on cookies and the enigne.traits_v1 data.  Response: add image format to
  the result list

searx/engines/duckduckgo_weather.py: DDG Weather
  Improved language and region handling based on cookies and the
  enigne.traits_v1 data.

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2023-03-24 10:37:42 +01:00
..
answerers [fix] issue reported by pylint 22.1.0 2022-02-04 09:45:35 +01:00
data [mod] DuckDuckGo: reversed engineered & upgrade to data_type: traits_v1 2023-03-24 10:37:42 +01:00
enginelib [mod] replace engines_languages.json by engines_traits.json 2023-03-24 10:37:42 +01:00
engines [mod] DuckDuckGo: reversed engineered & upgrade to data_type: traits_v1 2023-03-24 10:37:42 +01:00
infopage weblate: migration to https://translate.codeberg.org/ 2023-01-21 15:45:12 +00:00
metrics [fix] prepare for pylint 2.14.0 2022-06-03 15:41:52 +02:00
network [mod] Shuffle httpx's default ciphers of a SSL context randomly. 2023-03-19 13:40:31 +01:00
plugins Add "Auto-detected" as a language. 2023-02-17 15:17:36 +00:00
search [mod] replace engines_languages.json by engines_traits.json 2023-03-24 10:37:42 +01:00
static [fix] remove duplicate key in simple theme ESLint configuration 2023-03-05 09:12:13 +01:00
templates/simple [mod] replace searx.languages by searx.sxng_locales 2023-03-24 10:37:42 +01:00
translations [translations] update from Weblate 2023-03-24 07:07:52 +00:00
__init__.py [format.python] initial formatting of the python code 2021-12-27 09:26:22 +01:00
autocomplete.py [mod] DuckDuckGo: reversed engineered & upgrade to data_type: traits_v1 2023-03-24 10:37:42 +01:00
babel_extract.py [mod] move category and names of constants to searx/searxng.msg 2022-03-16 09:55:53 +01:00
compat.py [fix] pyright repported errors 2022-07-30 18:04:44 +02:00
exceptions.py [doc] Add doc-strings to searx.exceptions 2023-01-29 19:06:19 +01:00
external_bang.py External bang: bug fix: URL encode the query so "!!g 1+1" works as intended 2022-08-27 07:10:26 +00:00
external_urls.py [fix] typos / reported by @kianmeng in searx PR-3366 2022-09-27 18:32:14 +02:00
flaskfix.py [format.python] initial formatting of the python code 2021-12-27 09:26:22 +01:00
locales.py [mod] replace engines_languages.json by engines_traits.json 2023-03-24 10:37:42 +01:00
preferences.py [mod] replace engines_languages.json by engines_traits.json 2023-03-24 10:37:42 +01:00
query.py [mod] replace searx.languages by searx.sxng_locales 2023-03-24 10:37:42 +01:00
redisdb.py move searx.shared.redisdb to searx.redisdb 2022-12-10 09:26:38 +01:00
redislib.py [mod] redislib - optimize LUA script registration. 2022-05-30 11:21:09 +02:00
results.py [fix] typos / reported by @kianmeng in searx PR-3366 2022-09-27 18:32:14 +02:00
searxng.msg Science category: update the engines 2022-09-23 20:45:58 +02:00
settings.yml [mod] Peertube: re-engineered & upgrade to data_type: traits_v1 2023-03-24 10:37:42 +01:00
settings_defaults.py [mod] replace searx.languages by searx.sxng_locales 2023-03-24 10:37:42 +01:00
settings_loader.py [fix] typos / reported by @kianmeng in searx PR-3366 2022-09-27 18:32:14 +02:00
sxng_locales.py [mod] DuckDuckGo: reversed engineered & upgrade to data_type: traits_v1 2023-03-24 10:37:42 +01:00
unixthreadname.py [format.python] initial formatting of the python code 2021-12-27 09:26:22 +01:00
utils.py [mod] replace searx.languages by searx.sxng_locales 2023-03-24 10:37:42 +01:00
version.py SearXNG version: YYYY.MM.DD without leading zero 2023-01-22 10:45:00 +00:00
webadapter.py Add "Auto-detected" as a language. 2023-02-17 15:17:36 +00:00
webapp.py [mod] replace searx.languages by searx.sxng_locales 2023-03-24 10:37:42 +01:00
webutils.py [mod] replace engines_languages.json by engines_traits.json 2023-03-24 10:37:42 +01:00