[enh] add instant answers to google engine
commit0d4da30c7f9104224ec96d7adf61747fb761b52b
authorAdam Tauber <asciimoo@gmail.com>
dateThu 5 Jan 2017, 17:20 (10 years ago)
parentfc14fb0
searx/engines/google.py+4
@@ -217,6 +217,10 @@ def response(resp):
217217 # convert the text to dom
218218 dom = html.fromstring(resp.text)
219219
220+ instant_answer = dom.xpath('//div[@id="_vBb"]//text()')
221+ if instant_answer:
222+ results.append({'answer': u' '.join(instant_answer)})
223+
220224 # parse results
221225 for result in dom.xpath(results_xpath):
222226 try: