summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2020-08-31Revert "[enh] test: load each engine to check for syntax errors"Alexandre Flament
This reverts commit 4fb3ed2c6335b68f6b28ebc68d5d22f2fd621648.
2020-08-28[enh] test: load each engine to check for syntax errorsDalf
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-06-11[fix] commit 2c6531b2 breaks the unit test, this is a hotfixMarkus Heiser
commit 2c6531b2 does not only break the unit test, it is a significant change of the data model and the searx search-syntax model (UI) without any discussion nor documentation. At the end, adding routes to instant answers is a nice feature but commit 2c6531b2 leaf some questions open. In that sense, this patch is only a hotfix not a assessment. Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2020-03-13[fix] update csv unit testAdam Tauber
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-12-21[mod] remove useless engine unit testsAdam Tauber
These tests are not able to detect engine errors if the upstream site changes.
2019-12-07[fix] update xpaths for new google results pageMarc Abonce Seguin
2019-11-24add seedpeer againMarc Abonce Seguin
2019-10-16[fix] remove useless engine testsAdam Tauber
2019-10-14[fix] engine testAdam Tauber
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] fdroid engineDalf
2019-08-05[fix] arxiv engineDalf
2019-08-03[fix] fix monkey patch in test_webapp.py (#1667)Alexandre Flament
at the end of test_webapp.py, the monkey patch of searx.search.Search was not revert which lead to side effects on other tests close #1663
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-08-02[fix] fix flickr_noapi decoding (#1655)Alexandre Flament
Characters that were not ASCII were incorrectly decoded. Add an helper function: searx.utils.ecma_unescape (Python implementation of unescape Javascript function).
2019-07-29[fix] wikidata engine: faster processing, remove one HTTP redirection.Dalf
* Search URL is https://www.wikidata.org/w/index.php?{query}&ns0=1 (with ns0=1 at the end to avoid an HTTP redirection) * url_detail: remove the disabletidy=1 deprecated parameter * Add eval_xpath function: compile once for all xpath. * Add get_id_cache: retrieve all HTML with an id, avoid the slow to procress dynamic xpath '//div[@id="{propertyid}"]'.replace('{propertyid}') * Create an etree.HTMLParser() instead of using the global one (see #1575)
2019-07-28[enh] flickr_noapi: use complete JSON data block, add 'content', ↵Frank de Lange
'img_format', 'source', etc. (#1571) Fetch complete JSON data block, use legend to extract images. Unquote urlencoded strings. Add image description as 'content'. Add 'img_format' and 'source' data (needs PR #1567 to enable this data to be displayed). Show images which lack ownerid instead of discarding them.
2019-07-27[fix] bing_videos (#1579)Frank de Lange
use JSON where possible, compose 'content' using all available data, use correct 'url' (direct to source instead of redirect through bing)
2019-07-27[enh] bing_images: use data from embedded JSON to improve results (e.g. real ↵Frank de Lange
page title) (#1568) use data from embedded JSON to improve results (e.g. real page title), add image format and source info (see PR #1567), improve paging logic (it now works)
2019-07-25[mod] restore btdigg engine as btdig.com (#1515)volth
2019-07-25[fix] fix duden engine (#1594)rachmadani haryono
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-17[fix] secret_key can be bytes instead of a string (#1602)rachmadani haryono
Fix #1600 In settings.yml, the secret_key can be written as string or as base64 encoded data using !!binary notation.
2019-07-17[fix] preference query parameter decoding (#1599)rachmadani haryono
Fix issue #1598
2019-05-28Merge branch 'master' into feature/fix-configrachmadani haryono
2019-05-28Remove some engines : subtitleseeker, seedpeer, swisscowsDalf
http://www.subtitleseeker.com and http://www.seedpeer.eu don't exist anymore. https://swisscows.ch/ has change : the engine needs to be updated
2019-05-18new: dev: test for config apirachmadaniHaryono
2019-04-13[fix] duckduckgo images requestsMarc Abonce Seguin
2019-03-26[fix] get youtube results from js objectMarc Abonce Seguin
Results are not appearing in the html document anymore, instead they are found inside an object embedded in a script.
2019-01-14Merge branch 'master' into engines/unsplashd-tux
2019-01-08[fix] unicode error with WolframAlpha API engineMarc Abonce Seguin
2019-01-08Merge branch 'master' into engines/unsplashd-tux
2019-01-07fix after rebaseNoémi Ványi
2019-01-07Revert "remove 'all' option from search languages"Noémi Ványi
This reverts commit 4d1770398a6af8902e75c0bd885781584d39e796.
2019-01-06[fix] fetch google's supported languagesMarc Abonce Seguin
2019-01-06[fix] check language aliases when setting search languageMarc Abonce Seguin
2019-01-04Merge branch 'master' into devel_google_videosNoémi Ványi
2019-01-04Merge branch 'master' into bugfix_startpageNoémi Ványi
2019-01-04[fix] google videos testVenca24
2018-12-19Update bing image engine with new image json formatLéo Bourrel
2018-12-14change rest of test_startpage.pyMichael Pfitzner
2018-12-14change the html in test_startpage.py to look more like the actual startpage siteMichael Pfitzner
2018-11-22[fix] google videos testVenca24
2018-10-08Removes what looks like tracking parametersDenis Wernert
2018-10-08Adds a unit test for the unsplash engineDenis Wernert
2018-08-19[fix] remove publicly unavailable 500px engine - #1338Adam Tauber
2018-08-18duden.de enginedadosch
2018-07-06Fix wikidata tests with updated path to mediaLéo Bourrel