From ddc1d1ef43e1fe89e8ffd7e30cd1875068b6c775 Mon Sep 17 00:00:00 2001
From: j <0x006A@0x2620.org>
Date: Fri, 8 Oct 2010 17:43:25 +0200
Subject: [PATCH] use aka titles
---
ox/web/imdb.py | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/ox/web/imdb.py b/ox/web/imdb.py
index 072484d..c57a4cc 100644
--- a/ox/web/imdb.py
+++ b/ox/web/imdb.py
@@ -21,7 +21,7 @@ class Imdb(SiteParser):
'page': 'releaseinfo',
're': [
'name="akas".*?
(.*?)',
- "td>(.*?)\n\n(.*?) | "
+ "td>(.*?).*?(.*?) | "
],
'type': 'list'
@@ -204,6 +204,11 @@ class Imdb(SiteParser):
self.baseUrl = "http://www.imdb.com/title/tt%s/" % id
super(Imdb, self).__init__(timeout)
+ if 'alternative_titles' in self:
+ for t, i in self['alternative_titles']:
+ if 'imdb display title' in i:
+ self['title'] = t
+
if 'title' in self and self['title'].startswith('"') and self['title'].endswith('"'):
self['title'] = self['title'][1:-1]
if 'runtime' in self and self['runtime']: