reduce choice of alternative titles for english films, fixes #1084
This commit is contained in:
parent
13a55763d3
commit
639b74eac3
1 changed files with 12 additions and 7 deletions
|
@ -307,23 +307,28 @@ class Imdb(SiteParser):
|
||||||
break
|
break
|
||||||
if not stop_word and not type in types:
|
if not stop_word and not type in types:
|
||||||
types[type] = t[0]
|
types[type] = t[0]
|
||||||
for regexp in (
|
regexps = [
|
||||||
"^.+ \(imdb display title\) \(English title\)$",
|
"^.+ \(imdb display title\) \(English title\)$",
|
||||||
"^International \(English title\)$",
|
"^International \(English title\)$",
|
||||||
"^.+ \(English title\)$",
|
|
||||||
"^International \(.+\) \(English title\)$",
|
"^International \(.+\) \(English title\)$",
|
||||||
"^.+ \(.+\) \(English title\)$",
|
"^.+ \(.+\) \(English title\)$",
|
||||||
"^USA$",
|
"^USA$",
|
||||||
"^UK$",
|
"^UK$",
|
||||||
"^USA \(imdb display title\)$",
|
"^USA \(imdb display title\)$",
|
||||||
"^UK \(imdb display title\)$",
|
"^UK \(imdb display title\)$",
|
||||||
|
]
|
||||||
|
if not filter(lambda c: c in ('USA', 'UK', 'Australia'), self.get('country', [])):
|
||||||
|
regexps.insert(2, "^.+ \(English title\)$")
|
||||||
|
regexps += [
|
||||||
"^USA \(.+\)$",
|
"^USA \(.+\)$",
|
||||||
"^UK \(.+\)$",
|
"^UK \(.+\)$",
|
||||||
"^Australia \(.+\)$",
|
"^Australia \(.+\)$",
|
||||||
"^International \(.+ title\)$",
|
"^International \(.+ title\)$",
|
||||||
):
|
]
|
||||||
|
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
|
||||||
self['internationalTitle'] = types[type]
|
self['internationalTitle'] = types[type]
|
||||||
break
|
break
|
||||||
if 'internationalTitle' in self:
|
if 'internationalTitle' in self:
|
||||||
|
|
Loading…
Reference in a new issue