Skip to content

Commit

Permalink
[fix] engine duden - don't raise exception on empty result list
Browse files Browse the repository at this point in the history
Duden expects a word in German, so with query "amazing" the site finds nothing
and respons a 404:

    httpx.HTTPStatusError: Client error '404 Not Found' for url\
      'https://www.duden.de/suchen/dudenonline/amazing'

[1] searxng#1543 (comment)

Suggested-by: @allendema [1]
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
  • Loading branch information
return42 committed Aug 19, 2022
1 parent 6f28a69 commit b2a1e56
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions searx/engines/duden.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ def request(query, params):
# after the last page of results, spelling corrections are returned after a HTTP redirect
# whatever the page number is
params['soft_max_redirects'] = 1
params['raise_for_httperror'] = False
return params


Expand Down

0 comments on commit b2a1e56

Please sign in to comment.