refine title match

This commit is contained in:
j 2010-10-08 17:50:51 +02:00
parent 8230cb7c40
commit a106f0cfd7

View file

@ -205,9 +205,9 @@ class Imdb(SiteParser):
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
for t in self['alternative_titles']:
if len(t)>1 and 'imdb display title' in t[1]:
self['title'] = t[0]
if 'title' in self and self['title'].startswith('"') and self['title'].endswith('"'):
self['title'] = self['title'][1:-1]