summaryrefslogtreecommitdiff
path: root/searx/engines/yahoo.py
AgeCommit message (Collapse)Author
2025-09-03[mod] addition of various type hints / tbcMarkus Heiser
- pyright configuration [1]_ - stub files: types-lxml [2]_ - addition of various type hints - enable use of new type system features on older Python versions [3]_ - ``.tool-versions`` - set python to lowest version we support (3.10.18) [4]_: Older versions typically lack some typing features found in newer Python versions. Therefore, for local type checking (before commit), it is necessary to use the older Python interpreter. .. [1] https://docs.basedpyright.com/v1.20.0/configuration/config-files/ .. [2] https://pypi.org/project/types-lxml/ .. [3] https://typing-extensions.readthedocs.io/en/latest/# .. [4] https://mise.jdx.dev/configuration.html#tool-versions Signed-off-by: Markus Heiser <markus.heiser@darmarit.de> Format: reST
2025-06-22[refactor] yahoo engine: fix missing results and improve request code ↵useralias
structure (#4923) Changes: - Add required iscqry, pz and bct search parameters - Remove unused/optional search parameters (ei, fr2, age) - Fix offset calculation - Use new sB cookie for filters (time, safesearch, language) - Group related parameter assignments together - Restructure request parameter building to better match a real request - Use f-strings for string formatting - Add logging of domain and cookies used Related: - https://github.com/searxng/searxng/issues/4910
2025-05-24[mod] engines: Yahoo in different languages (#4826)Markus Heiser
BTW fix issue reported in [1] [1] https://github.com/searxng/searxng/pull/4814#issuecomment-2896948787 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de> Co-authored-by: Bnyro <bnyro@tutanota.com>
2025-05-20[fix] yahoo: url and title xpathuseralias
2025-04-29[fix] engine yahoo: replace fetch_traits by a list of languagesMarkus Heiser
The Yahoo engine's fetch_traits function has been encountering an error in CI jobs for several months [1], thus aborting the process for all other engines as well. The language selection dialog (which fetch_traits calls) requires an `EuConsent` cookie. Strangely, the cookie is not needed for searching, which is why the engine itself still works. Since Yahoo won't be conquering any new marketplaces in the foreseeable future, it should be sufficient to hard-implement the list of currently available languages ​​(`yahoo_languages`). [1] https://github.com/searxng/searxng/actions/runs/14720458830/job/41313149268 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-09-03[fix] engine yahoo: HTML tags are included in result titlesMarkus
- https://github.com/searxng/searxng/issues/3790 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-04-20[fix] yahoo: result titles are getting mixed togetherBnyro
2024-03-11[mod] pylint all engines without PYLINT_SEARXNG_DISABLE_OPTIONMarkus Heiser
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2023-10-01[typo] solved a typo in yahoo error message.Jinyuan Huang
2023-10-01[fix] Bug: Yahoo results for simplified Chinese search sometimes have the ↵Jinyuan Huang
first character cut off #2866 Co-authored-by: Blair Noctis <n@sail.ng>
2023-03-24[mod] yahoo: fetch engine traits (data_type: traits_v1)Markus Heiser
Implements a fetch_traits function for the Yahoo engine. .. note:: Includes migration of the request methode from 'supported_languages' to 'traits' (EngineTraits) object! Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-04-22[fix] FutureWarning from lxmlcapric98
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().
2022-01-05[enh] add more categoriesMartin Fischer
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-10-21[fix] yahoo engine - don't lump all search suggestions togetherMarkus Heiser
Closes: https://github.com/searxng/searxng/issues/421 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-10-16[fix] engine - yahoo: rewrite and fix issuesMarkus Heiser
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>
2021-10-16[pylint] engines: yahoo fix several issues reported from pylintMarkus Heiser
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-10-02[mod] move extract_text, extract_url to searx.utilsAlexandre Flament
2020-09-10Drop Python 2 (1/n): remove unicode string and url_utilsDalf
2020-06-25[fix] yahoo engine - changed content_xpathMarkus Heiser
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
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-01-07Revert "remove 'all' option from search languages"Noémi Ványi
This reverts commit 4d1770398a6af8902e75c0bd885781584d39e796.
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
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-11add year filter to engines with time range support && testsNoémi Ványi
Following engines does not support "Last year": * Bing News * DeviantArt * DuckDuckGo * Yahoo * YouTube (noapi)
2016-07-26[fix] time range detectionAdam Tauber
2016-07-25fix pep8Noemi Vanyi
2016-07-25add time range search with yahooNoemi Vanyi
2016-06-28[enh] display number of resultsAdam Tauber
2015-05-02update versions.cfg to use the current up-to-date packagesAlexandre Flament
2015-02-20[fix] update yahoo engine according to the web site changesdalf
2015-02-04Yahoo's unit testCqoicebordel
2014-12-16[fix] pep8Thomas Pointhuber
2014-12-07[fix] pep8 : engines (errors E121, E127, E128 and E501 still exist)dalf
2014-09-07[fix] yahoo engines: parse_url doesn't throw an exception with not tracking URLDalf
2014-09-01fix yahoo engines and add commentsThomas Pointhuber
2014-03-21[fix] indexing ++ url extractionAdam Tauber
2014-03-18[fix] #55Adam Tauber
2014-03-10[fix] pep8Adam Tauber
2014-03-08[fix] yahoo url extractionAdam Tauber
2014-03-04[fix] yahoo engine url extractionAdam Tauber
2014-02-27[fix] yahoo url modsAdam Tauber
2014-02-05Improves PEP8 compatibility.Gabor Nagy
2014-01-31[fix] pep8asciimoo