From 46791ba543afb1f6a0de3f79944a9b9dd3dd15c5 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Sun, 2 Oct 2011 16:23:49 +0200 Subject: [PATCH] handle one alternative title --- ox/web/imdb.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ox/web/imdb.py b/ox/web/imdb.py index 999c6ca..67180e5 100644 --- a/ox/web/imdb.py +++ b/ox/web/imdb.py @@ -284,6 +284,9 @@ class Imdb(SiteParser): self[t] = self[t][1:-1] if 'alternative_titles' in self: + if len(self['alternative_titles']) == 2 and \ + isinstance(self['alternative_titles'][0], basestring): + self['alternative_titles'] = [self['alternative_titles']] self['alternative_titles'] = [[t[0], t[1].split(' / ')[0].split('(')[0].strip()] for t in self['alternative_titles']]