mirror of
https://github.com/searxng/searxng.git
synced 2025-07-24 13:49:26 +02:00
[enh] engine cfg compatibilty
This commit is contained in:
parent
39d229e110
commit
74b6be3991
9 changed files with 36 additions and 39 deletions
|
@ -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
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue