mirror of
https://github.com/searxng/searxng.git
synced 2024-12-23 09:46:31 +00:00
[fix] pep8
This commit is contained in:
parent
e74bdf8429
commit
ed1c1bdb04
3 changed files with 2 additions and 3 deletions
|
@ -106,7 +106,7 @@ def response(resp):
|
||||||
doc = fromstring(resp.text)
|
doc = fromstring(resp.text)
|
||||||
|
|
||||||
# parse results
|
# parse results
|
||||||
for i,r in enumerate(doc.xpath(result_xpath)):
|
for i, r in enumerate(doc.xpath(result_xpath)):
|
||||||
if i >= 30:
|
if i >= 30:
|
||||||
break
|
break
|
||||||
try:
|
try:
|
||||||
|
|
|
@ -51,7 +51,6 @@ def request(query, params):
|
||||||
'engine0': 'v1all',
|
'engine0': 'v1all',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
# set language if specified
|
# set language if specified
|
||||||
if params['language'] != 'all':
|
if params['language'] != 'all':
|
||||||
language = 'english'
|
language = 'english'
|
||||||
|
|
|
@ -37,7 +37,7 @@ def on_result(request, search, result):
|
||||||
parsed_query = parse_qsl(query)
|
parsed_query = parse_qsl(query)
|
||||||
|
|
||||||
changed = False
|
changed = False
|
||||||
for i,(param_name,_) in enumerate(list(parsed_query)):
|
for i, (param_name, _) in enumerate(list(parsed_query)):
|
||||||
for reg in regexes:
|
for reg in regexes:
|
||||||
if reg.match(param_name):
|
if reg.match(param_name):
|
||||||
parsed_query.pop(i)
|
parsed_query.pop(i)
|
||||||
|
|
Loading…
Reference in a new issue