Commit Graph

37 Commits (ba8959ad7c18ce4165d29b7a472d845bd96f4735)

Author SHA1 Message Date
Markus Heiser ba8959ad7c [fix] typos / reported by @kianmeng in searx PR-3366
[PR-3366] https://github.com/searx/searx/pull/3366

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2 years ago
Markus Heiser 8df1f0c47e [mod] add 'Accept-Language' HTTP header to online processores
Most engines that support languages (and regions) use the Accept-Language from
the WEB browser to build a response that fits to the language (and region).

- add new engine option: send_accept_language_header

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2 years ago
Markus Heiser d84226bf63 [fix] issues reported by pylint
Fix pylint issues from commit (3d96a983)

    [format.python] initial formatting of the python code

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2 years ago
Markus Heiser 3d96a9839a [format.python] initial formatting of the python code
This patch was generated by black [1]::

    make format.python

[1] https://github.com/psf/black

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2 years ago
Markus Heiser f0059b80ed [pylint] engines: drop no longer needed 'missing-function-docstring'
Suggested-by: @dalf https://github.com/searxng/searxng/issues/102#issuecomment-914168470
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
3 years ago
Markus Heiser cd033b5416 [fix] drop useless pylint: disable=undefined-variable
Since 7b235a1 (see line 591) it is no longer needed to disable
'undefined-variable' for names defined in::

   PYLINT_ADDITIONAL_BUILTINS_FOR_ENGINES

Suggested-by: @dalf https://github.com/searxng/searxng/issues/102#issuecomment-914068609
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
3 years ago
Markus Heiser aecfb2300d [mod] one logger per engine - drop obsolete logger.getChild
Remove the no longer needed `logger = logger.getChild(...)` from engines.

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
3 years ago
Markus Heiser 343570f7fb [pylint] searx/engines/duckduckgo_definitions.py
BTW: normalize indentations

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
3 years ago
Alexandre Flament a4dcfa025c [enh] engines: add about variable
move meta information from comment to the about variable
so the preferences, the documentation can show these information
3 years ago
Alexandre Flament 28cc644f0a [fix] duckduckgo_definitions: fix relative image URL
ddg returns relative URL to https://duckduckgo.com/
3 years ago
Alexandre Flament b00d108673 [mod] pylint: numerous minor code fixes 3 years ago
Alexandre Flament 3038052c79 [mod] remove unused import
use
from searx.engines.duckduckgo import _fetch_supported_languages, supported_languages_url  # NOQA
so it is possible to easily remove all unused import using autoflake:
autoflake --in-place --recursive --remove-all-unused-imports searx tests
4 years ago
Alexandre Flament ca593728af [mod] duckduckgo_definitions: display only user friendly attributes / URL
various bug fixes
4 years ago
Alexandre Flament 2006eb4680 [mod] move extract_text, extract_url to searx.utils 4 years ago
Dalf 1022228d95 Drop Python 2 (1/n): remove unicode string and url_utils 4 years ago
Markus Heiser 30ad0c666d duckduckgo_definitions: remove the debug message
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
5 years ago
Markus Heiser b6d9f5aa71 [fix] duckduckgo_definition issues reported by 'manage.sh test'
Fix this error while travis build::

  /home/travis/build/asciimoo/searx/searx/engines/duckduckgo_definitions.py:21:44: E225 missing whitespace around operator

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
5 years ago
Markus Heiser 4998e9ec85 [fix] duckduckgo_definitions - where 'AnswerType' is 'calc'
Do not try to get text when 'AnswerType' is 'calc'.

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
5 years ago
Marc Abonce Seguin 772c048d01 refactor engine's search language handling
Add match_language function in utils to match any user given
language code with a list of engine's supported languages.

Also add language_aliases dict on each engine to translate
standard language codes into the custom codes used by the engine.
6 years ago
Adam Tauber 52e615dede [enh] py3 compatibility 7 years ago
marc af35eee10b tests for _fetch_supported_languages in engines
and refactor method to make it testable without making requests
8 years ago
marc f62ce21f50 [mod] fetch supported languages for several engines
utils/fetch_languages.py gets languages supported by each engine and
generates engines_languages.json with each engine's supported language.
8 years ago
marc 149802c569 [enh] add supported_languages on engines and auto-generate languages.py 8 years ago
a01200356 a44faa7716 [fix] compile regex in ddg_definitions 8 years ago
a01200356 6dca14e95d [enh] multilingual duckduckgo_definitions 8 years ago
Cqoicebordel 8c2a5f0492 DDG Definitions' unit tests 9 years ago
Adam Tauber 2181c4384e [mod] purge local html_to_text 9 years ago
dalf ffcec383b7 [fix] pep8 : duckduckgo_definitions and wikidata engines 10 years ago
dalf cac1761a54 [enh] infoboxes : if the result doesn't contain anything except one link, use the normal result template 10 years ago
Dalf 6bfd566353 [enh] add infoboxes and answers 10 years ago
asciimoo b2492c94f4 [fix] pep/flake8 compatibility 10 years ago
rhapsodhy 74ca542a02 [enh] set up special css classes for highlighting results + highlight definitions with dark grey border 10 years ago
Dalf e88cf0a0a8 [mod] minor fixes (duckduck_definitions : if a ddg bang is in the query, avoid a useless redirect) 10 years ago
asciimoo 74b6be3991 [enh] engine cfg compatibilty 11 years ago
asciimoo d793c2733c [enh] engine types 11 years ago
asciimoo cfba30f1ba [fix] comments removed 11 years ago
asciimoo e91e4e7fdb [enh] duckduckgo definitions 11 years ago