From e64cca8c3f5833cb88556d0ceabd0d17cac313e0 Mon Sep 17 00:00:00 2001 From: ta Date: Mon, 22 Aug 2022 17:04:29 +0700 Subject: [PATCH] don't raise error when nothing was found --- searx/engines/wttr.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/searx/engines/wttr.py b/searx/engines/wttr.py index 3c7b0927d..60e91114f 100644 --- a/searx/engines/wttr.py +++ b/searx/engines/wttr.py @@ -82,12 +82,17 @@ def request(query, params): params["url"] = url.format(query=quote(query), lang=params["language"]) + params["raise_for_httperror"] = False + return params def response(resp): results = [] + if resp.status_code == 404: + return [] + result = loads(resp.text) current = result["current_condition"][0]