fix parsing of search results

This commit is contained in:
Romain Bignon 2011-06-21 12:08:52 +02:00
commit 8be0f5e3dd

View file

@ -38,11 +38,7 @@ class TorrentsPage(BasePage):
return float(n*m[u])
def iter_torrents(self):
for table in self.document.getiterator('table'):
if table.attrib.get('id','') != 'searchResult':
raise Exception('You''re in serious troubles!')
else:
table = self.parser.select(self.document.getroot(), 'table#searchResult', 1)
for tr in table.getiterator('tr'):
if tr.get('class','') != "header":
td = tr.getchildren()[1]