From 02afccc2539753845e52b78f8cea617f79925311 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Tue, 16 Jul 2013 11:41:16 +0200 Subject: [PATCH] normalize alternative title country names --- ox/web/imdb.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ox/web/imdb.py b/ox/web/imdb.py index 9fb5905..fcc9435 100644 --- a/ox/web/imdb.py +++ b/ox/web/imdb.py @@ -443,7 +443,8 @@ class Imdb(SiteParser): self['alternativeTitles'] = [] for t in sorted(alt, lambda a, b: cmp(sorted(alt[a]), sorted(alt[b]))): if alt[t]: - self['alternativeTitles'].append((t, sorted(alt[t]))) + countries = sorted([normalize_country_name(c) or c for c in alt[t]]) + self['alternativeTitles'].append((t, countries)) if not self['alternativeTitles']: del self['alternativeTitles']