fix countries
This commit is contained in:
parent
e480b8dcbf
commit
2a03726c39
1 changed files with 5 additions and 3 deletions
|
@ -289,6 +289,11 @@ class Imdb(SiteParser):
|
|||
isinstance(self['alternativeTitles'][0], string_types):
|
||||
self['alternativeTitles'] = [self['alternativeTitles']]
|
||||
|
||||
for key in ('country', 'genre'):
|
||||
if key in self:
|
||||
self[key] = [x[0] if len(x) == 1 and isinstance(x, list) else x for x in self[key]]
|
||||
self[key] = list(filter(lambda x: x.lower() != 'home', self[key]))
|
||||
|
||||
#normalize country names
|
||||
if 'country' in self:
|
||||
self['country'] = [normalize_country_name(c) or c for c in self['country']]
|
||||
|
@ -372,9 +377,6 @@ class Imdb(SiteParser):
|
|||
|
||||
self['connections'] = cc
|
||||
|
||||
for key in ('country', 'genre'):
|
||||
if key in self:
|
||||
self[key] = list(filter(lambda x: x.lower() != 'home', self[key]))
|
||||
if 'isSeries' in self:
|
||||
del self['isSeries']
|
||||
self['isSeries'] = True
|
||||
|
|
Loading…
Reference in a new issue