1
0
mirror of https://github.com/searxng/searxng.git synced 2024-11-22 12:10:11 +01:00
searxng/searx/data
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
..
__init__.py [mod] replace engines_languages.json by engines_traits.json 2023-03-24 10:37:42 +01:00
ahmia_blacklist.txt Update searx.data - update_ahmia_blacklist.py 2023-03-01 01:38:07 +00:00
currencies.json Update searx.data - update_currencies.py 2023-03-01 01:37:46 +00:00
engine_descriptions.json Update searx.data - update_engine_descriptions.py 2023-03-01 01:48:22 +00:00
engine_traits.json [mod] DuckDuckGo: reversed engineered & upgrade to data_type: traits_v1 2023-03-24 10:37:42 +01:00
external_bangs.json Update searx.data - update_external_bangs.py 2022-10-29 01:46:27 +00:00
external_urls.json [mod] add external_urls.json and wikidata_units.json 2020-10-28 08:09:25 +01:00
lid.176.ftz [mod] new plugin: Autodetect search language 2022-12-10 13:11:47 +01:00
osm_keys_tags.json Update searx.data - update_osm_keys_tags.py 2022-10-11 11:49:06 +02:00
useragents.json Update searx.data - update_firefox_version.py 2023-03-01 01:37:42 +00:00
wikidata_units.json Update searx.data - update_wikidata_units.py 2023-03-01 01:37:25 +00:00