[feat] implement feeling lucky feature

This commit is contained in:
Bnyro 2023-09-10 18:44:16 +02:00 committed by Markus Heiser
parent 71508abcbf
commit dcee823345
6 changed files with 35 additions and 20 deletions

View file

@ -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']: