mirror of
https://github.com/searxng/searxng.git
synced 2026-09-23 06:36:12 +00:00
[fix] pixabay: crashes when there are no results
This commit is contained in:
@@ -77,9 +77,9 @@ def _video_result(result):
|
|||||||
def response(resp):
|
def response(resp):
|
||||||
results = []
|
results = []
|
||||||
|
|
||||||
# if there are no results on this page, we get a redirect
|
# if there are no results on this page, we get a redirect to the first page
|
||||||
# to the first page
|
# or if it's the first page, to an "auto-corrected" query (i.e. spelling changed)
|
||||||
if resp.status_code == 302:
|
if 300 <= resp.status_code < 400:
|
||||||
return results
|
return results
|
||||||
|
|
||||||
json_data = resp.json()
|
json_data = resp.json()
|
||||||
|
|||||||
Reference in New Issue
Block a user