refine title match
This commit is contained in:
parent
8230cb7c40
commit
a106f0cfd7
1 changed files with 3 additions and 3 deletions
|
@ -205,9 +205,9 @@ class Imdb(SiteParser):
|
||||||
super(Imdb, self).__init__(timeout)
|
super(Imdb, self).__init__(timeout)
|
||||||
|
|
||||||
if 'alternative_titles' in self:
|
if 'alternative_titles' in self:
|
||||||
for t, i in self['alternative_titles']:
|
for t in self['alternative_titles']:
|
||||||
if 'imdb display title' in i:
|
if len(t)>1 and 'imdb display title' in t[1]:
|
||||||
self['title'] = t
|
self['title'] = t[0]
|
||||||
|
|
||||||
if 'title' in self and self['title'].startswith('"') and self['title'].endswith('"'):
|
if 'title' in self and self['title'].startswith('"') and self['title'].endswith('"'):
|
||||||
self['title'] = self['title'][1:-1]
|
self['title'] = self['title'][1:-1]
|
||||||
|
|
Loading…
Reference in a new issue