summaryrefslogtreecommitdiff
path: root/searx/search.py
AgeCommit message (Collapse)Author
2020-12-17[mod] move seax/search.py to searx/search/__init__.pyAlexandre Flament
2020-12-11[enh] add raise_for_httperrorAlexandre Flament
check HTTP response: * detect some comme CAPTCHA challenge (no solving). In this case the engine is suspended for long a time. * otherwise raise HTTPError as before the check is done in poolrequests.py (was before in search.py). update qwant, wikipedia, wikidata to use raise_for_httperror instead of raise_for_status
2020-12-04[fix] wikipedia engine: don't raise an error when the query is not foundAlexandre Flament
Add a new parameter "raise_for_status", set by default to True. When True, any HTTP status code >= 300 raise an exception ( #2332 ) When False, the engine can manage the HTTP status code by itself.
2020-12-03[enh] record details exception per engineAlexandre Flament
add an new API /stats/errors
2020-12-01[mod] pylint: numerous minor code fixesAlexandre Flament
2020-11-20[enh] Add multiple outgoing proxiesAlexandre Flament
credits go to @bauruine see https://github.com/searx/searx/pull/1958
2020-11-14Merge pull request #2292 from kvch/elasticsearch-engineAlexandre Flament
New engine: Elasticsearch
2020-11-10New engine: ElasticsearchNoémi Ványi
2020-11-10[mod] searx.search: EngineRef, SearchQuery: add __repr__ and __eq__ methodsAlexandre Flament
2020-10-09Add yacy improvements: HTTP digest auth, category checkingNoémi Ványi
2020-10-06[fix] fix searx.webadapterAlexandre Flament
* Fix "?q=test&engines=wikipedia": fix exception * Fix "?q=test&engines=wikipedia&categories=images": now the engines from images category are included. * Fix parse_timeout: make sure a value is always returned * Various typing fixes (searx.webadapter, searx.search.SearchQuery)
2020-09-22[mod] add typing and __slots__Alexandre Flament
2020-09-22[mod] check the engine tokens in searx/webadapter.py instead of searx/search.pyAlexandre Flament
2020-09-22[mod] check time_range parameter in searx/webadapter.pyAlexandre Flament
2020-09-22[mod] add searx.search.EngineRefAlexandre Flament
was previously a Dict with two or three keys: name, category, from_bang make clear that this is a engine reference (see tests/unit/test_search.py for example) all variables using this class are renamed accordingly.
2020-09-22[mod] add searx/webadapter.pyAlexandre Flament
* move searx.search.get_search_query_from_webapp to searx.webadapter * move searx.query.SearchQuery to searx.search
2020-09-22[mod] searx.search: change function declaration: online then offline then ↵Alexandre Flament
utility functions.
2020-09-22[mod] searx.search: remove unused global variable number_of_searchesAlexandre Flament
2020-09-22[mod] searx.query.RawTextQuery: getSearchQuery and changeSearchQuery rename ↵Alexandre Flament
to getQuery and changeQuery getSearchQuery is confusing, the method returns a str not a SearchQuery object
2020-09-22[mod] searx.search.Search: split the search method into different methodsAlexandre Flament
2020-09-12[mod] searx.RawTextQuery: the constructor call parse_queryAlexandre Flament
2020-09-10Drop Python 2 (3/n): objectsDalf
2020-09-10Drop Python 2 (1/n): remove unicode string and url_utilsDalf
2020-09-01[enh] add option to configure proxies per engine - closes #1827Adam Tauber
2020-07-31Change isAlive() to is_alive() as isAlive() is unsupported in newer Python ↵asht
versions
2020-07-03Created new plugin type custom_results. Added new plugin bang_redirect (#2027)Lukas van den Berk
* Made first attempt at the bangs redirects plugin. * It redirects. But in a messy way via javascript. * First version with custom plugin * Added a help page and a operator to see all the bangs available. * Changed to .format because of support * Changed to .format because of support * Removed : in params * Fixed path to json file and changed bang operator * Changed bang operator back to & * Made first attempt at the bangs redirects plugin. * It redirects. But in a messy way via javascript. * First version with custom plugin * Added a help page and a operator to see all the bangs available. * Changed to .format because of support * Changed to .format because of support * Removed : in params * Fixed path to json file and changed bang operator * Changed bang operator back to & * Refactored getting search query. Also changed bang operator to ! and is now working. * Removed prints * Removed temporary bangs_redirect.js file. Updated plugin documentation * Added unit test for the bangs plugin * Fixed a unit test and added 2 more for bangs plugin * Changed back to default settings.yml * Added myself to AUTHORS.rst * Refacored working of custom plugin. * Refactored _get_bangs_data from list to dict to improve search speed. * Decoupled bangs plugin from webserver with redirect_url * Refactored bangs unit tests * Fixed unit test bangs. Removed dubbel parsing in bangs.py * Removed a dumb print statement * Refactored bangs plugin to core engine. * Removed bangs plugin. * Refactored external bangs unit tests from plugin to core. * Removed custom_results/bangs documentation from plugins.rst * Added newline in settings.yml so the PR stays clean. * Changed searx/plugins/__init__.py back to the old file * Removed newline search.py * Refactored get_external_bang_operator from utils to external_bang.py * Removed unnecessary import form test_plugins.py * Removed _parseExternalBang and _isExternalBang from query.py * Removed get_external_bang_operator since it was not necessary * Simplified external_bang.py * Simplified external_bang.py * Moved external_bangs unit tests to test_webapp.py. Fixed return in search with external_bang * Refactored query parsing to unicode to support python2 * Refactored query parsing to unicode to support python2 * Refactored bangs plugin to core engine. * Refactored search parameter to search_query in external_bang.py
2020-04-17[fix] translate engine errors to Occitan when configuredNoémi Ványi
2020-02-08[enh] introduce private enginesNoémi Ványi
This PR adds a new setting to engines named `tokens`. It expects a list of tokens which lets searx validate if the request should be accepted or not.
2019-10-16fix pep 8 checkNoémi Ványi
2019-10-16add initial support for offline engines && command engineNoémi Ványi
2019-08-02[fix] fix paging for the oscar theme after PR #1640Dalf
2019-08-02[enh] Add timeout limit per request (#1640)Alexandre Flament
The new url parameter "timeout_limit" set timeout limit defined in second. Example "timeout_limit=1.5" means the timeout limit is 1.5 seconds. In addition, the query can start with <[number] to set the timeout limit. For number between 0 and 99, the unit is the second : Example: "<30 searx" means the timeout limit is 3 seconds For number above 100, the unit is the millisecond: Example: "<850 searx" means the timeout is 850 milliseconds. In addition, there is a new optional setting: outgoing.max_request_timeout. If not set, the user timeout can't go above searx configuration (as before: the max timeout of selected engine for a query). If the value is set, the user can set a timeout between 0 and max_request_timeout using <[number] or timeout_limit query parameter. Related to #1077 Updated version of PR #1413 from @isj-privacore
2019-07-27[fix] "!wp !wp test" send only one request to wikipedia.Dalf
Note that "!general !wp test" is not fixed because the category for "!wp" is "none".
2019-07-17[enh] Add Server-Timing header (#1637)Alexandre Flament
Server Timing specification: https://www.w3.org/TR/server-timing/ In the browser Dev Tools, focus on the main request, there are the responses per engine in the Timing tab.
2019-07-17Suggestions: use RawTextQuery to make the suggestions URLs. Update all ↵Dalf
themes accordingly.
2019-01-25add again accidentally removed import to search.pyNoémi Ványi
2019-01-07Revert "remove 'all' option from search languages"Noémi Ványi
This reverts commit 4d1770398a6af8902e75c0bd885781584d39e796.
2018-08-19[fix] pep8Adam Tauber
2018-08-19[enh] admin configurable suspend time of errored engines - closes #1266Adam Tauber
2018-03-22forward category to engine without highlighting on the uiNoémi Ványi
2017-12-06remove 'all' option from search languagesmarc
2017-12-05[enh] display engine error messagesAdam Tauber
2017-11-22[enh] timeout and total HTTP time are managed by searx.poolrequestsAlexandre Flament
2017-07-20add timeout errors in search_multiple_requestsNoémi Ványi
2017-07-12show engine errors in infobox && add new error alertNoémi Ványi
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.
2017-01-27Merge branch 'master' into flask_perimeterAlexandre Flament
2017-01-21[fix] correct search parameter checkAdam Tauber
2017-01-21[fix] search time range value checkAdam Tauber