Commit Graph

42 Commits (master)

Author SHA1 Message Date
capric98 8c7e6cc983 [fix] FutureWarning from lxml
Just in case if content is None, the original code will skip extract_text(), and
just append the None value to 'content'. So just add allow_none=True, and this
will return None without raising a ValueError in extract_text().
2 years ago
Martin Fischer b02f762687 [enh] add more categories 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 713814547a [fix] yahoo engine - don't lump all search suggestions together
Closes: https://github.com/searxng/searxng/issues/421
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
3 years ago
Markus Heiser f63ffbb22b [fix] engine - yahoo: rewrite and fix issues
Languages are supported by mapping the language to a domain.  If domain is not
found in :py:obj:`lang2domain` URL ``<lang>.search.yahoo.com`` is used.

BTW: fix issue reported at https://github.com/searx/searx/issues/3020

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
3 years ago
Markus Heiser 38a157b56f [pylint] engines: yahoo fix several issues reported from pylint
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
3 years ago
Alexandre Flament ca93a01844 [mod] dynamically set language_support variable
The language_support variable is set to True by default,
and set to False in only 5 engines.

Except the documentation and the /config URL, this variable is not used.

This commit remove the variable definition in the engines, and
set value according to supported_languages length: False when the length is 0,
True otherwise.

Close #2485
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 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 5293e58032 [fix] yahoo engine - changed content_xpath
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
4 years ago
Dalf 85b3723345 [mod] speed optimization
compile XPath only once
avoid redundant call to urlparse
get_locale(webapp.py): avoid useless call to request.accept_languages.best_match
5 years ago
Noémi Ványi b63d645a52 Revert "remove 'all' option from search languages"
This reverts commit 4d1770398a.
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
marc 4d1770398a remove 'all' option from search languages 7 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
Noémi Ványi b034356825 add year filter to engines with time range support && tests
Following engines does not support "Last year":
 * Bing News
 * DeviantArt
 * DuckDuckGo
 * Yahoo
 * YouTube (noapi)
8 years ago
Adam Tauber 350a84520d [fix] time range detection 8 years ago
Noemi Vanyi a7c8d5882c fix pep8 8 years ago
Noemi Vanyi 93c0c49e9a add time range search with yahoo 8 years ago
Adam Tauber 2f7752b410 [enh] display number of results 8 years ago
Alexandre Flament 4689fe341c update versions.cfg to use the current up-to-date packages 9 years ago
dalf 57996b12fc [fix] update yahoo engine according to the web site changes 9 years ago
Cqoicebordel 9f13af8d3c Yahoo's unit test 9 years ago
Thomas Pointhuber a508d540ac [fix] pep8 10 years ago
dalf 7c13d630e4 [fix] pep8 : engines (errors E121, E127, E128 and E501 still exist) 10 years ago
Dalf a4ffeddce1 [fix] yahoo engines: parse_url doesn't throw an exception with not tracking URL 10 years ago
Thomas Pointhuber 03db970e6a fix yahoo engines and add comments 10 years ago
Adam Tauber 01c2eeb8ff [fix] indexing ++ url extraction 10 years ago
Adam Tauber faed14b2c6 [fix] #55 10 years ago
Adam Tauber 3acdf3f9a1 [fix] pep8 10 years ago
Adam Tauber 0fc481f47e [fix] yahoo url extraction 10 years ago
Adam Tauber ee1ffbc87f [fix] yahoo engine url extraction 10 years ago
Adam Tauber 4627788834 [fix] yahoo url mods 10 years ago
Gabor Nagy 22fd0746d9 Improves PEP8 compatibility. 10 years ago
asciimoo 3a2b9a8682 [fix] pep8 11 years ago
asciimoo 68a0832524 [enh] search language support upadtes 11 years ago
asciimoo 72793725e2 [fix] print removed 11 years ago
asciimoo 642986c2e7 [enh] yahoo engine added 11 years ago