diff options
author | Bnyro <bnyro@tutanota.com> | 2023-09-10 18:44:16 +0200 |
---|---|---|
committer | Markus Heiser <markus.heiser@darmarIT.de> | 2023-09-19 09:40:57 +0200 |
commit | dcee82334548ad8849391b5c29cdcd868b65daad (patch) | |
tree | 5313b41db400f0215c4b46a9af8bb51f1c11a8b2 /searx/webapp.py | |
parent | 71508abcbf77df7e996114e4f142a5f15eced6e4 (diff) | |
download | searxng-dcee82334548ad8849391b5c29cdcd868b65daad.tar.gz searxng-dcee82334548ad8849391b5c29cdcd868b65daad.zip |
[feat] implement feeling lucky feature
Diffstat (limited to 'searx/webapp.py')
-rwxr-xr-x | searx/webapp.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/searx/webapp.py b/searx/webapp.py index fe6dd6b74..b2a76ff92 100755 --- a/searx/webapp.py +++ b/searx/webapp.py @@ -697,6 +697,10 @@ def search(): previous_result = None results = result_container.get_ordered_results() + + if search_query.redirect_to_first_result and results: + return redirect(results[0]['url'], 302) + for result in results: if output_format == 'html': if 'content' in result and result['content']: |