Pārlūkot izejas kodu

[enh] displaying seeders/leechers

asciimoo 11 gadus atpakaļ
vecāks
revīzija
ef7e1199c3
1 mainītis faili ar 2 papildinājumiem un 0 dzēšanām
  1. 2
    0
      searx/engines/piratebay.py

+ 2
- 0
searx/engines/piratebay.py Parādīt failu

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