Skip to content

Commit

Permalink
[fix] pep8
Browse files Browse the repository at this point in the history
  • Loading branch information
asciimoo committed Jul 5, 2021
1 parent 198aad4 commit a898888
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions searx/engines/mongodb.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@ def search(query, params):
else:
q = {'$regex': re.compile('.*{0}.*'.format(re.escape(query)), re.I | re.M)}
results = _client.find({key: q})\
.skip((params['pageno']-1)*results_per_page)\
.limit(results_per_page)
.skip((params['pageno'] - 1) * results_per_page)\
.limit(results_per_page)
ret.append({'number_of_results': results.count()})
for r in results:
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
ret.append(r)
return ret

0 comments on commit a898888

Please sign in to comment.