mirror of
https://github.com/searx/searx
synced 2025-08-31 06:26:28 +00:00
[enh] add instant answers to google engine
This commit is contained in:
@@ -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:
|
||||
|
Reference in New Issue
Block a user