From 7c1df88815fdd7b0479d4b4a049c95cde7b864a7 Mon Sep 17 00:00:00 2001 From: Florent Date: Fri, 28 Dec 2012 23:35:41 +0100 Subject: [PATCH] Fix piratebay search Not sure if it is the best way to remove first element of an operator... --- modules/piratebay/pages/torrents.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/piratebay/pages/torrents.py b/modules/piratebay/pages/torrents.py index 555f8d78..308066db 100644 --- a/modules/piratebay/pages/torrents.py +++ b/modules/piratebay/pages/torrents.py @@ -38,7 +38,11 @@ class TorrentsPage(BasePage): def iter_torrents(self): table = self.parser.select(self.document.getroot(), 'table#searchResult', 1) + first = True for tr in table.getiterator('tr'): + if first: + first = False + continue if tr.get('class', '') != "header": td = tr.getchildren()[1] div = td.getchildren()[0]