[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