mirror of
https://github.com/searx/searx
synced 2024-12-12 08:46:26 +01:00
[fix] pep8
This commit is contained in:
parent
198aad43e0
commit
a8988885a5
@ -50,12 +50,12 @@ def search(query, params):
|
|||||||
else:
|
else:
|
||||||
q = {'$regex': re.compile('.*{0}.*'.format(re.escape(query)), re.I | re.M)}
|
q = {'$regex': re.compile('.*{0}.*'.format(re.escape(query)), re.I | re.M)}
|
||||||
results = _client.find({key: q})\
|
results = _client.find({key: q})\
|
||||||
.skip((params['pageno']-1)*results_per_page)\
|
.skip((params['pageno'] - 1) * results_per_page)\
|
||||||
.limit(results_per_page)
|
.limit(results_per_page)
|
||||||
ret.append({'number_of_results': results.count()})
|
ret.append({'number_of_results': results.count()})
|
||||||
for r in results:
|
for r in results:
|
||||||
del(r['_id'])
|
del(r['_id'])
|
||||||
r = {str(k):str(v) for k,v in r.items()}
|
r = {str(k): str(v) for k, v in r.items()}
|
||||||
r['template'] = result_template
|
r['template'] = result_template
|
||||||
ret.append(r)
|
ret.append(r)
|
||||||
return ret
|
return ret
|
||||||
|
Loading…
Reference in New Issue
Block a user