diff options
author | asciimoo <asciimoo@gmail.com> | 2013-10-23 23:55:37 +0200 |
---|---|---|
committer | asciimoo <asciimoo@gmail.com> | 2013-10-23 23:55:37 +0200 |
commit | 74b6be3991dc62577aca295de839e51e6d0807d6 (patch) | |
tree | 5bf5df160e765dc7dc6897e640fd23a761df1d2e /searx/engines/duckduckgo_definitions.py | |
parent | 39d229e1104dc10c7c7f00380c02d46118e3d895 (diff) | |
download | searxng-74b6be3991dc62577aca295de839e51e6d0807d6.tar.gz searxng-74b6be3991dc62577aca295de839e51e6d0807d6.zip |
[enh] engine cfg compatibilty
Diffstat (limited to 'searx/engines/duckduckgo_definitions.py')
-rw-r--r-- | searx/engines/duckduckgo_definitions.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/searx/engines/duckduckgo_definitions.py b/searx/engines/duckduckgo_definitions.py index 531b53ccc..2b180d0ff 100644 --- a/searx/engines/duckduckgo_definitions.py +++ b/searx/engines/duckduckgo_definitions.py @@ -1,7 +1,10 @@ import json +from urllib import urlencode + +url = 'http://api.duckduckgo.com/?{query}&format=json&pretty=0' def request(query, params): - params['url'] = 'http://api.duckduckgo.com/?q=%s&format=json&pretty=0' % query + params['url'] = url.format(query=urlencode({'q': query})) return params |