diff --git a/ox/web/impawards.py b/ox/web/impawards.py index 28dac82..c475d65 100644 --- a/ox/web/impawards.py +++ b/ox/web/impawards.py @@ -6,7 +6,6 @@ from ox.cache import readUrlUnicode from ox.html import stripTags from ox.text import findRe -import imdb def getData(id): ''' @@ -24,6 +23,8 @@ def getData(id): } html = readUrlUnicode(data['url']) data['imdbId'] = findRe(html, 'imdb.com/title/tt(\d{7})') + if not data['imdbId']: + data['imdbId'] = _id_map.get(id, '') data['title'] = stripTags(findRe(html, '

(.*?) \(')) data['year'] = findRe(html, '\((.*?)\)') data['posters'] = [] @@ -44,6 +45,7 @@ def getData(id): else: poster = 'http://www.impawards.com/%s/%s' % (data['year'], findRe(html, '