mirror of https://github.com/searxng/searxng.git
[fix] sanitize results II.
This commit is contained in:
parent
d2da51179a
commit
1e5cbc5f9e
|
@ -24,7 +24,7 @@ def response(resp):
|
||||||
url = urljoin(base_url, link.attrib.get('href'))
|
url = urljoin(base_url, link.attrib.get('href'))
|
||||||
parsed_url = urlparse(url)
|
parsed_url = urlparse(url)
|
||||||
# TODO better google link detection
|
# TODO better google link detection
|
||||||
if parsed_url.netloc.find('google.com') >= 0:
|
if parsed_url.netloc.find('www.google.com') >= 0:
|
||||||
continue
|
continue
|
||||||
title = ' '.join(link.xpath('.//text()'))
|
title = ' '.join(link.xpath('.//text()'))
|
||||||
content = escape(' '.join(result.xpath('.//p[@class="desc"]//text()')))
|
content = escape(' '.join(result.xpath('.//p[@class="desc"]//text()')))
|
||||||
|
|
Loading…
Reference in New Issue