From c0ec29fdc307e5dfb780c5320e6c48a2f4a9e6c3 Mon Sep 17 00:00:00 2001 From: Bnyro Date: Fri, 18 Sep 2026 12:01:58 +0200 Subject: [PATCH] [fix] pixabay: crashes when there are no results --- searx/engines/pixabay.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/searx/engines/pixabay.py b/searx/engines/pixabay.py index 64c35a36f..d3c5c8532 100644 --- a/searx/engines/pixabay.py +++ b/searx/engines/pixabay.py @@ -77,9 +77,9 @@ def _video_result(result): def response(resp): results = [] - # if there are no results on this page, we get a redirect - # to the first page - if resp.status_code == 302: + # if there are no results on this page, we get a redirect to the first page + # or if it's the first page, to an "auto-corrected" query (i.e. spelling changed) + if 300 <= resp.status_code < 400: return results json_data = resp.json()