summaryrefslogtreecommitdiff
path: root/searx/engines/xpath.py
diff options
context:
space:
mode:
authorasciimoo <asciimoo@gmail.com>2013-11-09 18:39:20 +0100
committerasciimoo <asciimoo@gmail.com>2013-11-09 18:39:20 +0100
commit17bf00ee42583910e45794e1438a2bab459225ad (patch)
treef1fc78646676c40c39cda1de9b69cf5dc39ff263 /searx/engines/xpath.py
parent14a53e343085083d0ddf271adff2d13ca1c94f99 (diff)
downloadsearxng-17bf00ee42583910e45794e1438a2bab459225ad.tar.gz
searxng-17bf00ee42583910e45794e1438a2bab459225ad.zip
[enh] removing result html tags
Diffstat (limited to 'searx/engines/xpath.py')
-rw-r--r--searx/engines/xpath.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/searx/engines/xpath.py b/searx/engines/xpath.py
index 8c2e04d5c..2743dc2a0 100644
--- a/searx/engines/xpath.py
+++ b/searx/engines/xpath.py
@@ -46,12 +46,11 @@ def request(query, params):
def response(resp):
results = []
dom = html.fromstring(resp.text)
- query = resp.search_params['query']
if results_xpath:
for result in dom.xpath(results_xpath):
url = extract_url(result.xpath(url_xpath))
title = ' '.join(result.xpath(title_xpath))
- content = escape(' '.join(result.xpath(content_xpath))).replace(query, '<b>{0}</b>'.format(query))
+ content = escape(' '.join(result.xpath(content_xpath)))
results.append({'url': url, 'title': title, 'content': content})
else:
for content, url, title in zip(dom.xpath(content_xpath), map(extract_url, dom.xpath(url_xpath)), dom.xpath(title_xpath)):