mirror of
https://github.com/searxng/searxng.git
synced 2025-07-24 05:39:22 +02:00
[mod] bing and duckduckgo engines : add / rename locale parameter
This commit is contained in:
parent
49c85fce51
commit
bf56ec4fb1
3 changed files with 7 additions and 5 deletions
|
@ -4,11 +4,11 @@ from cgi import escape
|
|||
|
||||
base_url = 'http://www.bing.com/'
|
||||
search_string = 'search?{query}'
|
||||
language = 'en-us' # see http://msdn.microsoft.com/en-us/library/dd251064.aspx
|
||||
locale = 'en-US' # see http://msdn.microsoft.com/en-us/library/dd251064.aspx
|
||||
|
||||
|
||||
def request(query, params):
|
||||
search_path = search_string.format(query=urlencode({'q': query, 'setmkt': language}))
|
||||
search_path = search_string.format(query=urlencode({'q': query, 'setmkt': locale}))
|
||||
#if params['category'] == 'images':
|
||||
# params['url'] = base_url + 'images/' + search_path
|
||||
params['url'] = base_url + search_path
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue