summaryrefslogtreecommitdiff
path: root/searx/engines
diff options
context:
space:
mode:
authorta <alt3753.7@gmail.com>2022-08-22 17:04:29 +0700
committerta <alt3753.7@gmail.com>2022-08-22 17:04:29 +0700
commite64cca8c3f5833cb88556d0ceabd0d17cac313e0 (patch)
treee363856600f5326d13a5df6a848c41c449e94307 /searx/engines
parent8c318562e236613bdef3c4e058a2223f139cb9bb (diff)
downloadsearxng-e64cca8c3f5833cb88556d0ceabd0d17cac313e0.tar.gz
searxng-e64cca8c3f5833cb88556d0ceabd0d17cac313e0.zip
don't raise error when nothing was found
Diffstat (limited to 'searx/engines')
-rw-r--r--searx/engines/wttr.py5
1 files changed, 5 insertions, 0 deletions
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]