mirror of https://github.com/searxng/searxng.git
[mod] minor fixes (duckduck_definitions : if a ddg bang is in the query, avoid a useless redirect)
This commit is contained in:
parent
75d22cd847
commit
e88cf0a0a8
|
@ -1,7 +1,7 @@
|
||||||
import json
|
import json
|
||||||
from urllib import urlencode
|
from urllib import urlencode
|
||||||
|
|
||||||
url = 'http://api.duckduckgo.com/?{query}&format=json&pretty=0'
|
url = 'http://api.duckduckgo.com/?{query}&format=json&pretty=0&no_redirect=1'
|
||||||
|
|
||||||
def request(query, params):
|
def request(query, params):
|
||||||
params['url'] = url.format(query=urlencode({'q': query}))
|
params['url'] = url.format(query=urlencode({'q': query}))
|
||||||
|
|
Loading…
Reference in New Issue