logo

searx

My custom branche(s) on searx, a meta-search engine
commit: ea03aaecb4996f270aa9e2ad701a482692ca2d62
parent: ef7e1199c3b9fad5b47af474423dedc356c6c2c2
Author: asciimoo <asciimoo@gmail.com>
Date:   Tue, 22 Oct 2013 19:15:41 +0200

[enh] magnet link added

Diffstat:

Msearx/engines/piratebay.py2++
1 file changed, 2 insertions(+), 0 deletions(-)

diff --git 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 += '<br />Seed: %s, Leech: %s' % (seed, leech) + magnetlink = result.xpath('.//a[@title="Download this torrent using magnet"]')[0] + content += '<br /><a href="%s">magnet link</a>' % urljoin(base_url, magnetlink.attrib['href']) results.append({'url': url, 'title': title, 'content': content}) return results