python3 issue with english titles, fixes #3003

This commit is contained in:
j 2017-02-14 15:33:23 +01:00
parent f1fea0f939
commit dddf29a439

View file

@ -423,7 +423,7 @@ class Imdb(SiteParser):
'USA', 'UK', 'United States', 'United Kingdom', 'USA', 'UK', 'United States', 'United Kingdom',
'Australia', 'New Zealand' 'Australia', 'New Zealand'
) )
if not filter(lambda c: c in english_countries, self.get('country', [])): if not list(filter(lambda c: c in english_countries, self.get('country', []))):
regexps += [ regexps += [
"^[^(]+ \(English title\)$", "^[^(]+ \(English title\)$",
"^.+ \(.+\) \(English title\)$", "^.+ \(.+\) \(English title\)$",
@ -440,7 +440,7 @@ class Imdb(SiteParser):
for regexp in regexps: for regexp in regexps:
for type in types: for type in types:
if re.compile(regexp).findall(type): if re.compile(regexp).findall(type):
#print types[type], type #print(types[type], type)
self['internationalTitle'] = types[type] self['internationalTitle'] = types[type]
break break
if 'internationalTitle' in self: if 'internationalTitle' in self: