that can also be empty on mininova
This commit is contained in:
parent
9fca883114
commit
87d7177282
1 changed files with 15 additions and 3 deletions
|
@ -109,9 +109,21 @@ class Mininova(Torrent):
|
|||
return
|
||||
Torrent.__init__(self)
|
||||
ratio = self.data['share ratio'].split(',')
|
||||
self['seeder'] = int(intValue(ratio[0].replace(',','').strip()))
|
||||
self['leecher'] = int(intValue(ratio[1].replace(',','').strip()))
|
||||
self['downloaded'] = int(intValue(self.data['downloads'].replace(',','').strip()))
|
||||
val = intValue(ratio[0].replace(',','').strip())
|
||||
if val:
|
||||
self['seeder'] = int(val)
|
||||
else:
|
||||
self['seeder'] = -1
|
||||
val = intValue(ratio[1].replace(',','').strip())
|
||||
if val:
|
||||
self['leecher'] = int(val)
|
||||
else:
|
||||
self['leecher'] = -1
|
||||
val = intValue(self.data['downloads'].replace(',','').strip())
|
||||
if val:
|
||||
self['downloaded'] = int(val)
|
||||
else:
|
||||
self['downloaded'] = -1
|
||||
published = self.data['added on']
|
||||
published = published.split(' +')[0]
|
||||
self['published'] = datetime.strptime(published, "%a, %d %b %Y %H:%M:%S")
|
||||
|
|
Loading…
Reference in a new issue