Commit Graph

37 Commits (8ca86f46d3dfd81a69d2c2d1515bb163f327826c)

Author SHA1 Message Date
Adam Tauber 17b6faa4c3 [fix] pep8 5 years ago
Adam Tauber 2292e6e130 [fix] handle missing result size 5 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
Léo Bourrel 88261e111c Fix bing engine results count (#1387)
This PR fixes the result count from bing which was throwing an (hidden) error and add a validation to avoid reading more results than avalaible.

For example :
If there is 100 results from some search and we try to get results from 120 to 130, Bing will send back the results from 0 to 10 and no error. If we compare results count with the first parameter of the request we can avoid this "invalid" results.
5 years ago
Dalf 1cee2c1796 [fix] bing engine
before this commit, sometimes there are no results
use a generic user-agent instead of one with the OS "Windows NT 6.3; WOW64"
5 years ago
Noémi Ványi b63d645a52 Revert "remove 'all' option from search languages"
This reverts commit 4d1770398a.
6 years ago
Marc Abonce Seguin 75b276f408 fix bing "garbage" results (issue #1275) 6 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 fd65c12921 make search language handling less strict
languages.py can change, so users may query on a language that is not
on the list anymore, even if it is still recognized by a few engines.

also made no and nb the same because they seem to return the same,
though most engines will only support one or the other.
7 years ago
Adam Tauber 6bf9c398a7 [fix] use english as default language in bing
If no language is specified, bing returns results with multiple languages
for one query which isn't really useful. Setting english as default
insted if nothing.
8 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
Adam Tauber 16bdc0baf4 [mod] do not escape html content in engines 8 years ago
Adam Tauber 43ddbc60da [fix] pep8 8 years ago
Adam Tauber 16f2e346b3 [fix] bing unicode issue part III. 8 years ago
Adam Tauber 1176505fa4 [fix] bing character encoding - closes #760 8 years ago
Adam Tauber 17b08d096c [fix] unicode search expression for bing 8 years ago
Adam Tauber 16ff8d06c7 [fix] bing paging and language support
see https://msdn.microsoft.com/en-us/library/ff795620.aspx for bing
specific search operators

closes #755
8 years ago
Adam Tauber 2f7752b410 [enh] display number of results 8 years ago
Adam Tauber 604f32f672 [fix] bing unicode encode error - fixes #408 9 years ago
Alexandre Flament 4689fe341c update versions.cfg to use the current up-to-date packages 9 years ago
Cqoicebordel 525af2a031 Add bing in the test units 10 years ago
dalf 7c13d630e4 [fix] pep8 : engines (errors E121, E127, E128 and E501 still exist) 10 years ago
Thomas Pointhuber 3d61d9b930 little refactoring 10 years ago
Thomas Pointhuber 4b1e0423a0 update bing engines and fix bing_news 10 years ago
Adam Tauber 66f02dc2b6 [fix] unused globals removed 10 years ago
Gabor Nagy 22fd0746d9 Improves PEP8 compatibility. 11 years ago
asciimoo 2a788c8f29 [enh] search language support init 11 years ago
asciimoo ca271fd861 [enh] bing, google paging support 11 years ago
Matej Cotman dd4662978d fix: robot fw, entry points, some flake8, package searx egg 11 years ago
Dalf bf56ec4fb1 [mod] bing and duckduckgo engines : add / rename locale parameter 11 years ago
asciimoo d9011f673e [fix] debug msg removed 11 years ago
asciimoo aa41c2b8ac [enh] bing updates ++ language support 11 years ago
asciimoo 2ca4cf7f2d [enh] bing engine added 11 years ago