From 149802c56926bf48520c98932c4c36b8152b3d2d Mon Sep 17 00:00:00 2001 From: marc Date: Fri, 5 Aug 2016 23:34:56 -0500 Subject: [enh] add supported_languages on engines and auto-generate languages.py --- searx/engines/mediawiki.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'searx/engines/mediawiki.py') diff --git a/searx/engines/mediawiki.py b/searx/engines/mediawiki.py index 26d3720d9..b17cb38e4 100644 --- a/searx/engines/mediawiki.py +++ b/searx/engines/mediawiki.py @@ -15,6 +15,7 @@ from json import loads from string import Formatter from urllib import urlencode, quote +from searx.engines.wikipedia import supported_engines # engine dependent config categories = ['general'] @@ -46,7 +47,7 @@ def request(query, params): if params['language'] == 'all': language = 'en' else: - language = params['language'].split('_')[0] + language = params['language'].split('-')[0] # format_string [('https://', 'language', '', None), ('.wikipedia.org/', None, None, None)] if any(x[1] == 'language' for x in format_strings): -- cgit v1.2.3-54-g00ecf