diff options
author | Noémi Ványi <kvch@users.noreply.github.com> | 2019-01-15 22:11:26 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-15 22:11:26 +0100 |
commit | 25367cfba13de9bec580d7d495c4e70b8ea8f76d (patch) | |
tree | bc4f87b06f658d13d8e4f6a553b5ab90ffe00ed8 /searx/engines/yahoo_news.py | |
parent | 4977ea5405954107d071235093f01d0246c31fb2 (diff) | |
parent | 383e3cc554a3704cd8b076aa686f32b8ce78f681 (diff) | |
download | searxng-25367cfba13de9bec580d7d495c4e70b8ea8f76d.tar.gz searxng-25367cfba13de9bec580d7d495c4e70b8ea8f76d.zip |
Merge branch 'master' into setup-no-tests
Diffstat (limited to 'searx/engines/yahoo_news.py')
-rw-r--r-- | searx/engines/yahoo_news.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/searx/engines/yahoo_news.py b/searx/engines/yahoo_news.py index b61384d06..9f6a4159b 100644 --- a/searx/engines/yahoo_news.py +++ b/searx/engines/yahoo_news.py @@ -41,7 +41,10 @@ suggestion_xpath = '//div[contains(@class,"VerALSOTRY")]//a' def request(query, params): offset = (params['pageno'] - 1) * 10 + 1 - language = match_language(params['language'], supported_languages, language_aliases).split('-')[0] + if params['language'] == 'all': + language = 'en' + else: + language = match_language(params['language'], supported_languages, language_aliases).split('-')[0] params['url'] = search_url.format(offset=offset, query=urlencode({'p': query}), |