mirror of
https://github.com/searxng/searxng.git
synced 2025-08-02 18:12:21 +02:00
[enh] display number of results
This commit is contained in:
parent
36c8977390
commit
2f7752b410
5 changed files with 31 additions and 6 deletions
|
@ -77,6 +77,13 @@ def response(resp):
|
|||
|
||||
dom = html.fromstring(resp.text)
|
||||
|
||||
try:
|
||||
results_num = int(dom.xpath('//div[@class="compPagination"]/span[last()]/text()')[0]
|
||||
.split()[0].replace(',', ''))
|
||||
results.append({'number_of_results': results_num})
|
||||
except:
|
||||
pass
|
||||
|
||||
# parse results
|
||||
for result in dom.xpath(results_xpath):
|
||||
try:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue