summaryrefslogtreecommitdiff
path: root/searx/engines/bing.py
AgeCommit message (Collapse)Author
2022-08-01[mod] add 'Accept-Language' HTTP header to online processoresMarkus Heiser
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>
2022-07-08bing.py: resolve bing.com/ck/a redirectionsAlexandre Flament
add a new function searx.network.multi_requests to send multiple HTTP requests at once
2022-03-31bing engine: _fetch_supported_languages: don't use the language code as a ↵Alexandre FLAMENT
country ref #1029
2022-01-05[enh] add more categoriesMartin Fischer
2022-01-01[fix] bing engines: fetch_supported_languagesMarkus Heiser
The Request to and the Response from https://www.bing.com/account/general has been changed. [1] https://github.com/searxng/searxng/pull/672#discussion_r777104919 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-12-27[format.python] initial formatting of the python codeMarkus Heiser
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>
2021-12-18[fix] bing engine: fix paging support, show inital page.Markus Heiser
Follow up queries for the pages needed to be fixed. - Split search-term in one for initial query and one for following queries. - Set some headers in HTTP requests, bing needs for paging support. - IMO //div[@class="sa_cc"] does no longer match in a bing response. Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-12-18[pylint] Bing (Web) engineMarkus Heiser
Fix remarks from pylint and improved code-style. In preparation for a bug-fix of the Bing (Web) engine I add this engine to the pylint-list. Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-09-06[mod] one logger per engine - drop obsolete logger.getChildMarkus Heiser
Remove the no longer needed `logger = logger.getChild(...)` from engines. Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-02-01[mod] dynamically set language_support variableAlexandre Flament
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
2021-01-14[enh] engines: add about variableAlexandre Flament
move meta information from comment to the about variable so the preferences, the documentation can show these information
2020-11-14[mod] remove unused importAlexandre Flament
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
2020-10-02[mod] move extract_text, extract_url to searx.utilsAlexandre Flament
2020-09-10Drop Python 2 (4/n): SearchQuery.query is a str instead of bytesDalf
2020-09-10Drop Python 2 (1/n): remove unicode string and url_utilsDalf
2020-03-01bing_news: parital rollback of c89c05bcMarkus Heiser
The bing_news bug (discussed in #1838) was caused by wrong language tags, which was fixed e0c99d9d / no need to change the bing_news search string. closes: https://github.com/asciimoo/searx/issues/1838 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2020-03-01bugfix: fetch_supported_languages bing, -news, -videos, -imagesMarkus Heiser
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2020-01-02[fix] pep8Adam Tauber
2020-01-02[fix] handle missing result sizeAdam Tauber
2019-11-15[mod] speed optimizationDalf
compile XPath only once avoid redundant call to urlparse get_locale(webapp.py): avoid useless call to request.accept_languages.best_match
2019-08-05Fix bing engine results count (#1387)Léo Bourrel
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.
2019-08-05[fix] bing engineDalf
before this commit, sometimes there are no results use a generic user-agent instead of one with the OS "Windows NT 6.3; WOW64"
2019-01-07Revert "remove 'all' option from search languages"Noémi Ványi
This reverts commit 4d1770398a6af8902e75c0bd885781584d39e796.
2018-05-20fix bing "garbage" results (issue #1275)Marc Abonce Seguin
2018-03-27refactor engine's search language handlingMarc Abonce Seguin
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.
2017-12-06remove 'all' option from search languagesmarc
2017-05-15[enh] py3 compatibilityAdam Tauber
2017-03-18make search language handling less strictmarc
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.
2016-12-30[fix] use english as default language in bingAdam Tauber
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.
2016-12-15tests for _fetch_supported_languages in enginesmarc
and refactor method to make it testable without making requests
2016-12-13[mod] fetch supported languages for several enginesmarc
utils/fetch_languages.py gets languages supported by each engine and generates engines_languages.json with each engine's supported language.
2016-12-13[enh] add supported_languages on engines and auto-generate languages.pymarc
2016-12-09[mod] do not escape html content in enginesAdam Tauber
2016-11-14[fix] pep8Adam Tauber
2016-11-14[fix] bing unicode issue part III.Adam Tauber
2016-11-14[fix] bing character encoding - closes #760Adam Tauber
2016-11-07[fix] unicode search expression for bingAdam Tauber
2016-11-07[fix] bing paging and language supportAdam Tauber
see https://msdn.microsoft.com/en-us/library/ff795620.aspx for bing specific search operators closes #755
2016-06-28[enh] display number of resultsAdam Tauber
2015-08-28[fix] bing unicode encode error - fixes #408Adam Tauber
2015-05-02update versions.cfg to use the current up-to-date packagesAlexandre Flament
2015-01-25Add bing in the test unitsCqoicebordel
2014-12-07[fix] pep8 : engines (errors E121, E127, E128 and E501 still exist)dalf
2014-09-02little refactoringThomas Pointhuber
2014-09-01update bing engines and fix bing_newsThomas Pointhuber
2014-07-09[fix] unused globals removedAdam Tauber
2014-02-05Improves PEP8 compatibility.Gabor Nagy
2014-01-31[enh] search language support initasciimoo
2014-01-29[enh] bing, google paging supportasciimoo
2014-01-20fix: robot fw, entry points, some flake8, package searx eggMatej Cotman