fix parsing seed and leech

This commit is contained in:
Romain Bignon 2010-11-27 09:46:59 +01:00
commit 4c5876ce73

View file

@ -76,8 +76,8 @@ class TorrentPage(BasePage):
url = div.getchildren()[0].attrib.get('href','') url = div.getchildren()[0].attrib.get('href','')
elif div.attrib.get('id','') == 'details': elif div.attrib.get('id','') == 'details':
size = float(div.getchildren()[0].getchildren()[5].text.split('(')[1].split('Bytes')[0]) size = float(div.getchildren()[0].getchildren()[5].text.split('(')[1].split('Bytes')[0])
seed = div.getchildren()[0].getchildren()[24].text seed = div.getchildren()[1].getchildren()[7].text
leech = div.getchildren()[0].getchildren()[26].text leech = div.getchildren()[1].getchildren()[9].text
elif div.attrib.get('class','') == 'nfo': elif div.attrib.get('class','') == 'nfo':
description = div.getchildren()[0].text description = div.getchildren()[0].text
torrent = Torrent(id, title) torrent = Torrent(id, title)