forked from zaclys/searxng
[enh] removed missing params; [fix] pep8
This commit is contained in:
parent
bc806bfab1
commit
7bf1013c15
|
@ -26,6 +26,7 @@ def is_valid_lang(lang):
|
|||
return (True, l[1].lower())
|
||||
return False
|
||||
|
||||
|
||||
def request(query, params):
|
||||
m = parser_re.match(unicode(query, 'utf8'))
|
||||
if not m:
|
||||
|
@ -39,13 +40,13 @@ def request(query, params):
|
|||
if not from_lang or not to_lang:
|
||||
return params
|
||||
|
||||
params['url'] = url.format(from_lang=from_lang[1], to_lang=to_lang[1],query=query)
|
||||
params['from_lang'] = from_lang[1]
|
||||
params['to_lang'] = to_lang[1]
|
||||
params['query'] = query
|
||||
params['url'] = url.format(from_lang=from_lang[1],
|
||||
to_lang=to_lang[1],
|
||||
query=query)
|
||||
|
||||
return params
|
||||
|
||||
|
||||
def response(resp):
|
||||
results = []
|
||||
|
||||
|
@ -70,5 +71,3 @@ def response(resp):
|
|||
})
|
||||
|
||||
return results
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue