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
Propagate error messages from YouTube API
Noémi Ványie158eeee4bf6
diff --git a/searx/engines/youtube_api.py b/searx/engines/youtube_api.pyindex 2542169a6..4a205ed6c 100644--- a/searx/engines/youtube_api.py+++ b/searx/engines/youtube_api.py@@ -47,6 +47,9 @@ def response(resp):search_results = loads(resp.text)+ if 'error' in search_results and 'message' in search_results['error']:+ raise Exception(search_results['error']['message'])+# return empty array if there are no resultsif 'items' not in search_results:return []