From 133262ba5bd75243438eea1875f84b14df14d4c4 Mon Sep 17 00:00:00 2001 From: j Date: Fri, 26 Jan 2018 08:49:33 +0100 Subject: [PATCH] fix aspect ratio --- ox/web/imdb.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ox/web/imdb.py b/ox/web/imdb.py index a0bee77..386376b 100644 --- a/ox/web/imdb.py +++ b/ox/web/imdb.py @@ -92,7 +92,10 @@ class Imdb(SiteParser): }, 'aspectratio': { 'page': 'reference', - 're': 'Aspect Ratio.*?ipl-inline-list__item">\s+([\d\.]+)', + 're': [ + 'Aspect Ratio.*?ipl-inline-list__item">\s+([\d\.\:]+)', + lambda r: str(int(r.split(':')[0])/int(r.split(':')[1])) if ':' in r else r, + ], 'type': 'float', }, 'budget': zebra_table('Budget', more=[