summaryrefslogtreecommitdiff
path: root/searx/engines/duckduckgo_definitions.py
diff options
context:
space:
mode:
Diffstat (limited to 'searx/engines/duckduckgo_definitions.py')
-rw-r--r--searx/engines/duckduckgo_definitions.py5
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