fix aspect ratio parsing

This commit is contained in:
j 2018-05-01 11:43:34 +02:00
parent eb7158dae1
commit 4905a8e48d

View file

@ -94,7 +94,7 @@ class Imdb(SiteParser):
'page': 'reference',
're': [
'Aspect Ratio</td>.*?ipl-inline-list__item">\s+([\d\.\:\ ]+)',
lambda r: str(float(r.split(':')[0])/float(r.split(':')[1])) if ':' in r else r,
lambda r: str(float(r.split(':')[0])/float(r.split(':')[1].split(' ')[0])) if ':' in r else r,
],
'type': 'float',
},