From 17bf00ee42583910e45794e1438a2bab459225ad Mon Sep 17 00:00:00 2001 From: asciimoo Date: Sat, 9 Nov 2013 18:39:20 +0100 Subject: [enh] removing result html tags --- searx/engines/xpath.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'searx/engines/xpath.py') 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, '{0}'.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)): -- cgit v1.2.3