fix parsing of search results
This commit is contained in:
parent
0a73b9e963
commit
8be0f5e3dd
1 changed files with 26 additions and 30 deletions
|
|
@ -38,11 +38,7 @@ class TorrentsPage(BasePage):
|
||||||
return float(n*m[u])
|
return float(n*m[u])
|
||||||
|
|
||||||
def iter_torrents(self):
|
def iter_torrents(self):
|
||||||
|
table = self.parser.select(self.document.getroot(), 'table#searchResult', 1)
|
||||||
for table in self.document.getiterator('table'):
|
|
||||||
if table.attrib.get('id','') != 'searchResult':
|
|
||||||
raise Exception('You''re in serious troubles!')
|
|
||||||
else:
|
|
||||||
for tr in table.getiterator('tr'):
|
for tr in table.getiterator('tr'):
|
||||||
if tr.get('class','') != "header":
|
if tr.get('class','') != "header":
|
||||||
td = tr.getchildren()[1]
|
td = tr.getchildren()[1]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue