Skip to content

SearXNG is a free internet metasearch engine which aggregates results from various search services and databases. Users are neither tracked nor profiled.

[fix] google-news engine - KeyError: 'hl in request

Markus Heiserdd7b53d3690e
diff --git a/searx/engines/google_news.py b/searx/engines/google_news.py
index 485d602bc..38cbbd0ea 100644
--- a/searx/engines/google_news.py
+++ b/searx/engines/google_news.py
@@ -94,8 +94,8 @@ def request(query, params):
ceid = "%s:%s" % (lang_info['country'], lang_info['language'])
# google news redirects en to en-US
- if lang_info['hl'] == 'en':
- lang_info['hl'] = 'en-US'
+ if lang_info['params']['hl'] == 'en':
+ lang_info['params']['hl'] = 'en-US'
# Very special to google-news compared to other google engines, the time
# range is included in the search term.