summaryrefslogtreecommitdiff
path: root/searx/webapp.py
AgeCommit message (Collapse)Author
2021-03-22[mod] preferences: a tooltip is shown when the mouse is over the engine namesAlexandre Flament
2021-03-16[mod] replace /translations.js by embedded JSONAlexandre Flament
In webapp.py, there is a new function "get_translations" lists available translations Close #2064
2021-03-16[mod] upgrade pygmentsAlexandre Flament
add searx_extra/update/update_pygments.py to update the css style of the oscar and simple themes.
2021-03-06[enh] add ability to send engine data to subsequent requestsAdam Tauber
2021-03-01[enh] autocomplete refactoring, autocomplete on external bangsAlexandre Flament
2021-02-04[fix] get correct locale with country from browserMarc Abonce Seguin
Some of our interface locales include uppercase country codes, which are separated by `_` instead of the more common `-`. Also, a browser's `Accept-Language` header could be in lowercase. This commit attempts to normalize those cases so a browser's language+country codes can better match with our locales. This solution assumes that our UI locales have nothing more than language and optionally country. If we ever add a script specific locale like `zh-Hant-TW` this would have to change to accomodate that, but the idea would be pretty much the same as this fix.
2021-01-12[enh] checker: background checkAlexandre Flament
See settings.yml for the options SIGUSR1 signal starts the checker. The result is available at /stats/checker
2021-01-11[fix] add missing brand.CONTACT_URL to /config API endpointMarkus Heiser
Suggested-by: @dalf / https://github.com/searx/searx-stats2/issues/59#issuecomment-747961582 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2020-12-27[mod] check secret_key when searx.webapp is importedAlexandre Flament
Without this commit the module searx checks the secret_key value. With this commit, make docs, utils/standalone_searx.py, utils/fetch_firefox_version.py works without SEARX_DEBUG=1 For reference see https://github.com/searx/searx/pull/2386
2020-12-17[mod] split searx.search into different processorsAlexandre Flament
see searx.search.processors.abstract.EngineProcessor First the method searx call the get_params method. If the return value is not None, then the searx call the method search.
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-26Merge pull request #2327 from renyhp/masterAlexandre Flament
Add preference for displaying advanced settings
2020-11-26Remove unused linesrenyhp
2020-11-26Fix syntax errorrenyhp
2020-11-26Another patchrenyhp
2020-11-23Patch advanced search preferencesrenyhp
2020-11-22Add preference for displaying advanced settingsrenyhp
2020-11-20[enh] Add multiple outgoing proxiesAlexandre Flament
credits go to @bauruine see https://github.com/searx/searx/pull/1958
2020-11-17Fix type of unresponsive_enginesNoémi Ványi
Previously __get_translated_errors returned a list. But unresponsive_engines is a set. Closes #2305
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-11-14Merge pull request #2289 from dalf/pylintAlexandre Flament
[mod] pylint: add extension-pkg-whitelist=lxml.etree
2020-11-14Merge pull request #2300 from dalf/fix-webapp-indexAlexandre Flament
[fix] fix of / and /search
2020-11-06[fix] fix of / and /searchAlexandre Flament
* URL / : the index page displayed the selected or the default category. * URL / : when the q parameter is set using the URL, the redirect includes the URL query. * URL /search : an empty query doesn't raise an exception.
2020-11-05[enh] add default http headers - closes #715Adam Tauber
2020-11-03[mod] pylint: minor code change to allow pylint globallyAlexandre Flament
This commit is only a step, it doesn't fix all the issues reported by pylint
2020-11-02[mod] separate index and search routesMarc Abonce Seguin
This makes it easier to separately handle search and index requests from a web server or from a reverse proxy. If a request to index contains a query, a permanent redirect HTTP response is returned. This should give some level of backwards compatibility for users that have set a searx instance in their browser's search bar.
2020-10-25[enh] Add onions category with Ahmia, Not Evil and Torcha01200356
Xpath engine and results template changed to account for the fact that archive.org doesn't cache .onions, though some onion engines migth have their own cache. Disabled by default. Can be enabled by setting the SOCKS proxies to wherever Tor is listening and setting using_tor_proxy as True. Requires Tor and updating packages. To avoid manually adding the timeout on each engine, you can set extra_proxy_timeout to account for Tor's (or whatever proxy used) extra time.
2020-10-25Let admins lock user preferencesNoémi Ványi
2020-10-08[fix] use base_url everywhere if it is defined in settings.ymlAdam Tauber
2020-10-06[fix] opensearch.xml URL contains method and autocomplete parametersAlexandre Flament
When the user add searx as a search engine, the browser loads the /opensearch.xml URL without the cookies. Without the query parameters, the user preferences are ignored (method and autocomplete). In addition, opensearch.xml is modified to support automatic updates, see https://developer.mozilla.org/en-US/docs/Web/OpenSearch
2020-10-05[mod] webapp.py: update engines initialization conditionAlexandre Flament
Always call initialize engines except on the first run of werkzeug with the reload feature. the reload feature is activated when: * searx_debug is True (SEARX_DEBUG environment variable or settings.yml) * FLASK_APP=searx/webapp.py FLASK_ENV=development flask run (see https://flask.palletsprojects.com/en/1.1.x/cli/ ) Fix SEARX_DEBUG=0 make docs docs/admin/engines.rst : engines are initialized See https://github.com/searx/searx/issues/2204#issuecomment-701373438
2020-09-28Merge pull request #2189 from dalf/architecture-clean-upAdam Tauber
Architecture clean up
2020-09-26[mod] upgrade requests to version 2.24.0. use ssl instead of pyopenssl.Alexandre Flament
requests 2.24.0 uses the ssl module except if it doesn't support SNI, in this case searx fallbacks to pyopenssl. searx logs a critical message and exit if the ssl modules doesn't support SNI and pyOpenSSL is not installed. searx logs a critical message and exit if the ssl version is older than 1.0.2. in requirements.txt, pyopenssl is still required to install searx as a fallback.
2020-09-24[mod] more typingAlexandre Flament
2020-09-22[mod] searx/webadapter.py: add get_selected_categories share common code ↵Alexandre Flament
with get_search_query_from_webapp Update searx/webapp.py to use get_selected_categories Close #2142
2020-09-22[mod] check the engine tokens in searx/webadapter.py instead of searx/search.pyAlexandre Flament
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.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] add searx/webutils.pyAlexandre Flament
contains utility functions and classes used only by webapp.py
2020-09-22[mod] refactor searx.webapp.get_localeAlexandre Flament
* Log each call to get_locale: display the URL, the locale and the source (browser, preferences, form). * Rename _get_browser_language to _get_browser_or_settings_language to match the actual code.
2020-09-22[fix] /autocompleter: return HTTP 400 when q is empty as intent.Alexandre Flament
Fix commit c225db45c8a4ab466bff049216f7e0189dc1b067
2020-09-12[mod] searx.RawTextQuery: the constructor call parse_queryAlexandre Flament
2020-09-10Drop Python 2 (4/n): SearchQuery.query is a str instead of bytesDalf
2020-09-10Drop Python 2 (3/n): objectsDalf
2020-09-10Drop Python 2 (2/n): templatesDalf
2020-09-10Drop Python 2 (1/n): remove unicode string and url_utilsDalf
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-08-18[fix] opensearch on chromium for android (#2132)Émilien Devos