From 643cd1480a115c71e8ab0b74053ef502c6e2eb2a Mon Sep 17 00:00:00 2001 From: Romain Bignon Date: Sun, 8 May 2011 17:16:57 +0200 Subject: [PATCH] several minor fixes --- weboob/backends/gazelle/pages/torrents.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/weboob/backends/gazelle/pages/torrents.py b/weboob/backends/gazelle/pages/torrents.py index c2d76fc9..0dbdf548 100644 --- a/weboob/backends/gazelle/pages/torrents.py +++ b/weboob/backends/gazelle/pages/torrents.py @@ -93,7 +93,7 @@ class TorrentsPage(BasePage): continue id = '%s.%s' % (params['id'][0], m.group(1)) size, unit = tds[i+3].text.split() - size = get_bytes_size(float(size), unit) + size = get_bytes_size(float(size.replace(',','')), unit) seeders = int(tds[-2].text) leechers = int(tds[-1].text) @@ -163,8 +163,8 @@ class TorrentsPage(BasePage): continue torrent.url = self.format_url(url) - size, unit = tr.cssselect('div.details_title strong')[0].text.strip('()').split() - torrent.size = get_bytes_size(float(size), unit) + size, unit = tr.cssselect('div.details_title strong')[-1].text.strip('()').split() + torrent.size = get_bytes_size(float(size.replace(',', '')), unit) torrent.seeders = int(tr.cssselect('img[title=Seeders]')[0].tail) torrent.leechers = int(tr.cssselect('img[title=Leechers]')[0].tail) break