feat: fix rare cases where description is ill formatted

This commit is contained in:
Alessandro Pezzè 2019-12-17 17:25:50 +01:00
parent ef7b165704
commit 4a6e519b39

View file

@ -118,7 +118,11 @@ def scrub_str(string):
if group[0]:
sub = group[0]
else:
sub = group[1].split(":")[1]
sub = group[1].split(":")
if len(sub) >= 2:
sub = sub[1]
else:
sub = sub[0]
sub = sub.replace("-", " ")
string = re.sub(SUB_RGX, sub, string, 1)
return string