1
0
mirror of https://github.com/searxng/searxng.git synced 2024-11-19 02:40:11 +01:00

[fix] link attrib

This commit is contained in:
asciimoo 2013-10-20 20:53:12 +02:00
parent ec28b77a93
commit 15a2c27864

View File

@ -24,6 +24,6 @@ def response(resp):
url = urljoin(base_url, link.attrib.get('href'))
title_links = result.xpath('.//span[@class="details"]//a[contains(@class, "t")]')
title = ''.join(title_links[0].xpath('.//text()'))
content = html.tostring(link)+'<br />'+link.attrib.get('title')
content = html.tostring(link)+'<br />'+link.attrib.get('title', '')
results.append({'url': url, 'title': title, 'content': content})
return results