summaryrefslogtreecommitdiff
path: root/searx/engines/google_scholar.py
diff options
context:
space:
mode:
Diffstat (limited to 'searx/engines/google_scholar.py')
-rw-r--r--searx/engines/google_scholar.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/searx/engines/google_scholar.py b/searx/engines/google_scholar.py
index a0ca70e53..fbf443e2e 100644
--- a/searx/engines/google_scholar.py
+++ b/searx/engines/google_scholar.py
@@ -81,15 +81,14 @@ def request(query, params):
# params, {}, language_aliases
- params, supported_languages, language_aliases
+ params, supported_languages, language_aliases, False
)
# subdomain is: scholar.google.xy
lang_info['subdomain'] = lang_info['subdomain'].replace("www.", "scholar.")
query_url = 'https://'+ lang_info['subdomain'] + '/scholar' + "?" + urlencode({
'q': query,
- 'hl': lang_info['hl'],
- 'lr': lang_info['lr'],
+ **lang_info['params'],
'ie': "utf8",
'oe': "utf8",
'start' : offset,
@@ -100,8 +99,8 @@ def request(query, params):
logger.debug("query_url --> %s", query_url)
params['url'] = query_url
- logger.debug("HTTP header Accept-Language --> %s", lang_info['Accept-Language'])
- params['headers']['Accept-Language'] = lang_info['Accept-Language']
+ logger.debug("HTTP header Accept-Language --> %s", lang_info.get('Accept-Language'))
+ params['headers'].update(lang_info['headers'])
params['headers']['Accept'] = (
'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8'
)