SearXNG is a free internet metasearch engine which aggregates results from various search services and databases. Users are neither tracked nor profiled.
Python bingbravedegoogleduckduckgogooglemetasearchprivacypythonqwantsearchsearch-enginesearxsearxngstartpageyahoo
[fix] encapsulate wolframalpha token fetching errors
Adam Tauberdb72fc644989
diff --git a/searx/engines/wolframalpha_noapi.py b/searx/engines/wolframalpha_noapi.pyindex bffbbe466..3ebbc4196 100644--- a/searx/engines/wolframalpha_noapi.py+++ b/searx/engines/wolframalpha_noapi.py@@ -44,9 +44,12 @@ token = {'value': '',# seems, wolframalpha resets its token in every hourdef obtain_token():update_time = time() - (time() % 3600)- token_response = http_get('https://www.wolframalpha.com/input/api/v1/code?ts=9999999999999999999', timeout=2.0)- token['value'] = loads(token_response.text)['code']- token['last_updated'] = update_time+ try:+ token_response = http_get('https://www.wolframalpha.com/input/api/v1/code?ts=9999999999999999999', timeout=2.0)+ token['value'] = loads(token_response.text)['code']+ token['last_updated'] = update_time+ except:+ passreturn token