mirror of
https://github.com/searxng/searxng.git
synced 2025-07-19 03:09:25 +02:00
[feat] implement feeling lucky feature
This commit is contained in:
parent
71508abcbf
commit
dcee823345
6 changed files with 35 additions and 20 deletions
|
@ -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']:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue