[enh] display number of results

This commit is contained in:
Adam Tauber 2016-06-28 00:06:50 +02:00
parent 36c8977390
commit 2f7752b410
5 changed files with 31 additions and 6 deletions

View file

@ -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: