searxng/docs
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
..
_themes/searxng [fix] sphinx 5.x: add nav.contents everywhere that div.topic is used 2022-07-05 17:05:06 +02:00
admin [mod] replace engines_languages.json by engines_traits.json 2023-03-24 10:37:42 +01:00
build-templates [doc] update documentation of the installation procedures 2022-07-30 13:39:35 +02:00
dev [mod] replace engines_languages.json by engines_traits.json 2023-03-24 10:37:42 +01:00
src [mod] DuckDuckGo: reversed engineered & upgrade to data_type: traits_v1 2023-03-24 10:37:42 +01:00
user Sphinx doc: rename "User documentation" to "User Information" 2022-03-16 22:26:36 +01:00
utils [docs] corrections from @tiekoetter's review 2022-07-30 13:39:35 +02:00
conf.py [mod] replace engines_languages.json by engines_traits.json 2023-03-24 10:37:42 +01:00
donate.rst Update docs/donate.rst 2022-06-29 21:02:46 +02:00
index.rst Move donation page to docs.searxng.org and link to it from instances 2022-06-29 17:26:19 +00:00
own-instance.rst [docs] move own-instance.rst out of docs/user 2022-03-07 08:29:00 +01:00