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

[enh] displaying seeders/leechers

This commit is contained in:
asciimoo 2013-10-22 19:15:30 +02:00
parent 9ad8013a45
commit ef7e1199c3

View File

@ -30,5 +30,7 @@ def response(resp):
url = urljoin(base_url, link.attrib.get('href')) url = urljoin(base_url, link.attrib.get('href'))
title = ' '.join(link.xpath('.//text()')) title = ' '.join(link.xpath('.//text()'))
content = escape(' '.join(result.xpath('.//font[@class="detDesc"]//text()'))) content = escape(' '.join(result.xpath('.//font[@class="detDesc"]//text()')))
seed, leech = result.xpath('.//td[@align="right"]/text()')[:2]
content += '<br />Seed: %s, Leech: %s' % (seed, leech)
results.append({'url': url, 'title': title, 'content': content}) results.append({'url': url, 'title': title, 'content': content})
return results return results