mirror of
https://github.com/searxng/searxng.git
synced 2025-07-22 12:49:22 +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,8 +1,11 @@
|
|||
from json import loads
|
||||
from urllib import urlencode
|
||||
|
||||
url = 'https://duckduckgo.com/'
|
||||
search_url = url + 'd.js?{query}&l=us-en&p=1&s=0'
|
||||
|
||||
def request(query, params):
|
||||
params['url'] = 'https://duckduckgo.com/d.js?q=%s&l=us-en&p=1&s=0' % query
|
||||
params['url'] = search_url.format(query=urlencode({'q': query}))
|
||||
return params
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue