summaryrefslogtreecommitdiff
path: root/searx/webapp.py
AgeCommit message (Collapse)Author
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.
2018-03-17[fix] get doi_rewriters from settings - fixes #1245Adam Tauber
2018-02-19[enh] update translations - add taiwanese and filipinoAdam Tauber
2017-12-06Merge pull request #973 from MarcAbonce/languagesAdam Tauber
Remove 'all' option from search languages
2017-12-06remove 'all' option from search languagesmarc
2017-12-05[enh] make custom oscar option configurable from urlAdam Tauber
2017-11-23[fix] autocompleter py3 compatibility - fixes #1088Adam Tauber
2017-11-15fix bug: TypeError: set(['bing', 'google']) is not JSON serializable, when ↵yujunqiang
curl 'http://127.0.0.1:8888/?q=xxxxxxxx&categories=general&format=json'
2017-11-01minor fixes of doi resolverNoémi Ványi
Closes #1047
2017-11-01[enh] oa_doi_rewrite plugin broadens doai_rewritejibe-b
2017-10-26[mod] compress saved preferences in urlAdam Tauber
2017-09-08fix hmac python3 compatibilityNoémi Ványi
2017-09-08[fix] static path fixed in templates and webapp, line endings fixedmisnyo
2017-07-20[enh] allow default empty values for normal and result proxiesAdam Tauber
2017-07-12show engine errors in infobox && add new error alertNoémi Ványi
2017-07-10[enh] generate search url of saved preferencesAdam Tauber
2017-06-12[fix] load engines if debug mode is enabled using uwsgiAdam Tauber
2017-05-22[fix] rss feed : the jinja template was not found when the rss feed returns ↵Alexandre Flament
an valid feed including an error.
2017-05-15[mod] settings.yml can be /etc/searx/settings.ymlAlexandre Flament
The exact order is * first from SEARX_SETTINGS_PATH, * if not found then from searx code base, * if not found then from /etc/searx/settings.yml * if not found an exception stops searx loading
2017-05-15[mod] the static and templates directories can be defined in the settings.ymlAlexandre Flament
2017-05-15[enh] py3 compatibilityAdam Tauber
2017-03-23[mod] upgrade requirements.txtAlexandre Flament
2017-01-27Merge branch 'master' into flask_perimeterAlexandre Flament
2017-01-20[enh] validate input and raise an exception inside search.py. The exception ↵Alexandre Flament
message is output in json and rss format.
2017-01-20[mod] add a __common__ template that can't be selected but that provides a ↵Alexandre Flament
common place for shared templates. What has been moved into this template : * opensearch*.xml is always the same whatever the themes. * the text inside */about.html
2017-01-16[enh] show spelling correctionsDavid A Roberts
2017-01-15Merge branch 'master' into flask_perimeterAlexandre Flament
2017-01-07[mod] /config API : add language_support, paging, safesearch, ↵Dalf
supported_languages, time_range_support, timeout fields.
2017-01-02[mod] searx uses flask framework only in webapp.py. Make migration to ↵Alexandre Flament
another framework easier.
2016-12-28[fix] load engines with uwsgi tooAdam Tauber
2016-12-28Merge branch 'master' into languagesAdam Tauber
2016-12-27[fix] do not reload engines twice if started with debug modeAdam Tauber
2016-12-27[enh] explicit engine initAdam Tauber
2016-12-25[fix] robot tests ++ set default value for server http protocol versionAdam Tauber
2016-12-25[enh] configurable listening http protocol versionAdam Tauber
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-10[enh] extend json response with suggestions, infoboxes and answersAdam Tauber
2016-12-09Merge branch 'master' into searchpy2Alexandre Flament
2016-12-09[enh] central handling of empty result titlesAdam Tauber
2016-12-09[enh] central html escaping of resultsAdam Tauber
2016-11-19[enh] add quick answer functionality with an example answererAdam Tauber
2016-11-15[fix] gettext requires request.preferencesAdam Tauber
2016-11-14[fix] remove unused importsAdam Tauber
2016-11-14[enh] display errorsAdam Tauber
also tried flask's flash feature but flask creates session cookies if it isn't flushed. Avoiding session cookies to preserve privacy
2016-11-14[enh] show traceback of search errorsAdam Tauber
2016-11-05Simplify search.py, basically updated PR #518Alexandre Flament
The timeouts in settings.yml is about the total time (not only the HTTP request but also the prepare the request and parsing the response) It was more or less the case before since the threaded_requests function ignores the thread after the timeout even the HTTP request is ended. New / changed stats : * page_load_time : record the HTTP request time * page_load_count: the number of HTTP request * engine_time : the execution total time of an engine * engine_time_count : the number of "engine_time" measure The avg response times in the preferences are the engine response time (engine_load_time / engine_load_count) To sum up : * Search.search() filters the engines that can't process the request * Search.search() call search_multiple_requests function * search_multiple_requests creates one thread per engine, each thread runs the search_one_request function * search_one_request calls the request function, make the HTTP request, calls the response function, extends the result_container * search_multiple_requests waits for the the thread to finish (or timeout)
2016-11-02[mod] replace references request.request_data (GET or POST parameters) by ↵Alexandre Flament
request.form (based on merge of POST and GET parameters)
2016-11-02Clean up the architecturedalf
Purposes : - isolate the plugins calls - distinction between parsing the web request and running the search (Search class). To be able to test code easily, to run searx code outside a web server, to filter the search query parameters with plugins more easily, etc... Details : - request.request_data contains request.form or request.args (initialize inside pre_request() function) - Query class is renamed RawTextQuery - SearchQuery class defines all search parameters - get_search_query_from_webapp create a SearchQuery instance (basically the previous Search.__init__ code) - Search class and SearchWithPlugins class takes a SearchQuery instance as class constructor parameter - SearchWithPlugins class inherites from Search class, and run plugins - A dedicated function search_with_plugins executes plugins to have a well define locals() (which is used by the plugins code). - All plugins code is executed inside the try...except block (webapp.py, index function) - advanced_search HTTP parameter value stays in webapp.py (it is only part of UI) - multiple calls to result_container.get_ordered_results() doesn't compute the order multiple time (note : this method was call only once before) - paging value is stored in the result_container class (compute in the extend method) - test about engine.suspend_end_time is done during search method call (instead of __init__) - check that the format parameter value is one of these : html, rss, json, rss (before the html value was assumed but some text formatting wasn't not done)
2016-10-30[mod] do not proxify images if image proxy is not setAdam Tauber