diff options
author | asciimoo <asciimoo@gmail.com> | 2013-11-09 18:39:20 +0100 |
---|---|---|
committer | asciimoo <asciimoo@gmail.com> | 2013-11-09 18:39:20 +0100 |
commit | 17bf00ee42583910e45794e1438a2bab459225ad (patch) | |
tree | f1fc78646676c40c39cda1de9b69cf5dc39ff263 /searx/engines/xpath.py | |
parent | 14a53e343085083d0ddf271adff2d13ca1c94f99 (diff) | |
download | searxng-17bf00ee42583910e45794e1438a2bab459225ad.tar.gz searxng-17bf00ee42583910e45794e1438a2bab459225ad.zip |
[enh] removing result html tags
Diffstat (limited to 'searx/engines/xpath.py')
-rw-r--r-- | searx/engines/xpath.py | 3 |
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)): |