mirror of https://github.com/searx/searx
[fix] DDG engine format and remove logger
This commit is contained in:
parent
8448079155
commit
3f05513601
|
@ -53,6 +53,7 @@ time_range_dict = {
|
||||||
url = 'https://lite.duckduckgo.com/lite'
|
url = 'https://lite.duckduckgo.com/lite'
|
||||||
url_ping = 'https://duckduckgo.com/t/sl_l'
|
url_ping = 'https://duckduckgo.com/t/sl_l'
|
||||||
|
|
||||||
|
|
||||||
# match query's language to a region code that duckduckgo will accept
|
# match query's language to a region code that duckduckgo will accept
|
||||||
def get_region_code(lang, lang_list=None):
|
def get_region_code(lang, lang_list=None):
|
||||||
if lang == 'all':
|
if lang == 'all':
|
||||||
|
@ -114,10 +115,9 @@ def request(query, params):
|
||||||
params['data']['df'] = time_range_dict[params['time_range']]
|
params['data']['df'] = time_range_dict[params['time_range']]
|
||||||
params['cookies']['df'] = time_range_dict[params['time_range']]
|
params['cookies']['df'] = time_range_dict[params['time_range']]
|
||||||
|
|
||||||
logger.debug("param data: %s", params['data'])
|
|
||||||
logger.debug("param cookies: %s", params['cookies'])
|
|
||||||
return params
|
return params
|
||||||
|
|
||||||
|
|
||||||
# get response from search-request
|
# get response from search-request
|
||||||
def response(resp):
|
def response(resp):
|
||||||
|
|
||||||
|
@ -171,6 +171,7 @@ def response(resp):
|
||||||
|
|
||||||
return results
|
return results
|
||||||
|
|
||||||
|
|
||||||
# get supported languages from their site
|
# get supported languages from their site
|
||||||
def _fetch_supported_languages(resp):
|
def _fetch_supported_languages(resp):
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue