diff options
Diffstat (limited to 'searx/engines/photon.py')
-rw-r--r-- | searx/engines/photon.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/searx/engines/photon.py b/searx/engines/photon.py index 15236f680..240841954 100644 --- a/searx/engines/photon.py +++ b/searx/engines/photon.py @@ -35,10 +35,9 @@ def request(query, params): search_string.format(query=urlencode({'q': query}), limit=number_of_results) - if params['language'] != 'all': - language = params['language'].split('_')[0] - if language in supported_languages: - params['url'] = params['url'] + "&lang=" + language + language = params['language'].split('-')[0] + if language in supported_languages: + params['url'] = params['url'] + "&lang=" + language # using searx User-Agent params['headers']['User-Agent'] = searx_useragent() |