From 12326461c14e8d7827a3861c63ce7917a0993da4 Mon Sep 17 00:00:00 2001 From: j Date: Fri, 6 Apr 2018 14:27:49 +0530 Subject: [PATCH] lists of lists --- ox/web/imdb.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/ox/web/imdb.py b/ox/web/imdb.py index ae00cd0..863d362 100644 --- a/ox/web/imdb.py +++ b/ox/web/imdb.py @@ -200,8 +200,16 @@ class Imdb(SiteParser): # 'type': 'list' #}, 'runtime': zebra_list('Runtime'), - 'color': zebra_list('Color', more=['([^(<]+)', strip_tags]), - 'sound': zebra_list('Sound Mix', more=['([^(<]+)', strip_tags]), + 'color': zebra_list('Color', more=[ + '([^(<]+)', + lambda r: r[0] if isinstance(r, list) else r, + strip_tags + ]), + 'sound': zebra_list('Sound Mix', more=[ + '([^(<]+)', + lambda r: r[0] if isinstance(r, list) else r, + strip_tags + ]), 'season': { 'page': 'reference', 're': [