several minor fixes
This commit is contained in:
parent
53ac1e700e
commit
643cd1480a
1 changed files with 3 additions and 3 deletions
|
|
@ -93,7 +93,7 @@ class TorrentsPage(BasePage):
|
||||||
continue
|
continue
|
||||||
id = '%s.%s' % (params['id'][0], m.group(1))
|
id = '%s.%s' % (params['id'][0], m.group(1))
|
||||||
size, unit = tds[i+3].text.split()
|
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)
|
seeders = int(tds[-2].text)
|
||||||
leechers = int(tds[-1].text)
|
leechers = int(tds[-1].text)
|
||||||
|
|
||||||
|
|
@ -163,8 +163,8 @@ class TorrentsPage(BasePage):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
torrent.url = self.format_url(url)
|
torrent.url = self.format_url(url)
|
||||||
size, unit = tr.cssselect('div.details_title strong')[0].text.strip('()').split()
|
size, unit = tr.cssselect('div.details_title strong')[-1].text.strip('()').split()
|
||||||
torrent.size = get_bytes_size(float(size), unit)
|
torrent.size = get_bytes_size(float(size.replace(',', '')), unit)
|
||||||
torrent.seeders = int(tr.cssselect('img[title=Seeders]')[0].tail)
|
torrent.seeders = int(tr.cssselect('img[title=Seeders]')[0].tail)
|
||||||
torrent.leechers = int(tr.cssselect('img[title=Leechers]')[0].tail)
|
torrent.leechers = int(tr.cssselect('img[title=Leechers]')[0].tail)
|
||||||
break
|
break
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue