summaryrefslogtreecommitdiff
path: root/searx/engines/google.py
diff options
context:
space:
mode:
Diffstat (limited to 'searx/engines/google.py')
-rw-r--r--searx/engines/google.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/searx/engines/google.py b/searx/engines/google.py
index 0fdf2d4ae..e14e9e702 100644
--- a/searx/engines/google.py
+++ b/searx/engines/google.py
@@ -221,6 +221,12 @@ def response(resp):
instant_answer = dom.xpath('//div[@id="_vBb"]//text()')
if instant_answer:
results.append({'answer': u' '.join(instant_answer)})
+ try:
+ results_num = int(dom.xpath('//div[@id="resultStats"]//text()')[0]
+ .split()[1].replace(',', ''))
+ results.append({'number_of_results': results_num})
+ except:
+ pass
# parse results
for result in dom.xpath(results_xpath):