diff options
Diffstat (limited to 'searx/engines/youtube_api.py')
-rw-r--r-- | searx/engines/youtube_api.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/searx/engines/youtube_api.py b/searx/engines/youtube_api.py index f8bc353f4..6de18aa2c 100644 --- a/searx/engines/youtube_api.py +++ b/searx/engines/youtube_api.py @@ -34,7 +34,9 @@ def request(query, params): params['url'] = search_url.format(query=urlencode({'q': query}), api_key=api_key) - params['url'] += '&relevanceLanguage=' + params['language'].split('-')[0] + # add language tag if specified + if params['language'] != 'all': + params['url'] += '&relevanceLanguage=' + params['language'].split('-')[0] return params |