From ea03aaecb4996f270aa9e2ad701a482692ca2d62 Mon Sep 17 00:00:00 2001 From: asciimoo Date: Tue, 22 Oct 2013 19:15:41 +0200 Subject: [PATCH] [enh] magnet link added --- searx/engines/piratebay.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/searx/engines/piratebay.py b/searx/engines/piratebay.py index c838b5bdd..7821c9dcb 100644 --- a/searx/engines/piratebay.py +++ b/searx/engines/piratebay.py @@ -32,5 +32,7 @@ def response(resp): 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) + magnetlink = result.xpath('.//a[@title="Download this torrent using magnet"]')[0] + content += '
magnet link' % urljoin(base_url, magnetlink.attrib['href']) results.append({'url': url, 'title': title, 'content': content}) return results