From ef7e1199c3b9fad5b47af474423dedc356c6c2c2 Mon Sep 17 00:00:00 2001 From: asciimoo Date: Tue, 22 Oct 2013 19:15:30 +0200 Subject: [PATCH] [enh] displaying seeders/leechers --- searx/engines/piratebay.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/searx/engines/piratebay.py b/searx/engines/piratebay.py index 0d99e4722..c838b5bdd 100644 --- a/searx/engines/piratebay.py +++ b/searx/engines/piratebay.py @@ -30,5 +30,7 @@ def response(resp): url = urljoin(base_url, link.attrib.get('href')) title = ' '.join(link.xpath('.//text()')) content = escape(' '.join(result.xpath('.//font[@class="detDesc"]//text()'))) + seed, leech = result.xpath('.//td[@align="right"]/text()')[:2] + content += '
Seed: %s, Leech: %s' % (seed, leech) results.append({'url': url, 'title': title, 'content': content}) return results