summaryrefslogtreecommitdiff
path: root/searx/engines/google.py
diff options
context:
space:
mode:
authorAlexandre Flament <alex@al-f.net>2017-01-15 22:18:20 +0100
committerGitHub <noreply@github.com>2017-01-15 22:18:20 +0100
commit7a16aca346c14994f304a6961c55b63ab260265a (patch)
tree4cd44fc2fe23d17d1cb574042c98a276f04253c9 /searx/engines/google.py
parent627962ce40cd66d84f1be2d88907496fbd40b902 (diff)
parent1a9f8240b851c64a10be7b8990b6f3926ca506b3 (diff)
Merge branch 'master' into flask_perimeter
Diffstat (limited to 'searx/engines/google.py')
-rw-r--r--searx/engines/google.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/searx/engines/google.py b/searx/engines/google.py
index 803cd307e..2fa638d73 100644
--- a/searx/engines/google.py
+++ b/searx/engines/google.py
@@ -217,6 +217,10 @@ def response(resp):
# convert the text to dom
dom = html.fromstring(resp.text)
+ instant_answer = dom.xpath('//div[@id="_vBb"]//text()')
+ if instant_answer:
+ results.append({'answer': u' '.join(instant_answer)})
+
# parse results
for result in dom.xpath(results_xpath):
try: