From b5b480e3f2db08f4d4eadcf73557680d6090c0ba Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Sat, 22 Sep 2012 22:44:08 +0200 Subject: [PATCH] use imdb display title before other titles, dont add internationalTitle if its the same as title --- ox/web/imdb.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ox/web/imdb.py b/ox/web/imdb.py index f018798..eea4ed1 100644 --- a/ox/web/imdb.py +++ b/ox/web/imdb.py @@ -299,6 +299,8 @@ class Imdb(SiteParser): "^.+ \(.+\) \(English title\)$", "^USA$", "^UK$", + "^USA \(imdb display title\)$", + "^UK \(imdb display title\)$", "^USA \(.+\)$", "^UK \(.+\)$", "^Australia \(.+\)$", @@ -321,6 +323,11 @@ class Imdb(SiteParser): for t in ('title', 'internationalTitle'): if t in self: self[t] = cleanup_title(self[t]) + + if 'internationalTitle' in self and \ + self.get('title') == self['internationalTitle']: + del self['internationalTitle'] + if 'alternativeTitles' in self: alt = {} for t in self['alternativeTitles']: