fix year substraction for short names
This commit is contained in:
parent
be9e9dbdae
commit
40b8b8eb31
|
@ -76,7 +76,10 @@ class Static:
|
||||||
year_pattern = re.compile(r'\(?[0-9]{4}\)?')
|
year_pattern = re.compile(r'\(?[0-9]{4}\)?')
|
||||||
year = year_pattern.findall(showname)
|
year = year_pattern.findall(showname)
|
||||||
if year and year[0] != showname:
|
if year and year[0] != showname:
|
||||||
showname = showname.replace(year[0], '').replace("..", ".")
|
words = showname.split()
|
||||||
|
words.remove(year[0])
|
||||||
|
if len(words) > 1:
|
||||||
|
showname = showname.replace(year[0], '').replace("..", ".")
|
||||||
# find acronym
|
# find acronym
|
||||||
acronym = [i for i in showname.split(".") if len(i) == 1]
|
acronym = [i for i in showname.split(".") if len(i) == 1]
|
||||||
# clean up
|
# clean up
|
||||||
|
|
Loading…
Reference in New Issue