fix run parsing - artist mistaken as views (closes #313)

This commit is contained in:
sigma67 2022-11-03 17:17:19 +01:00
commit d48951f00f
No known key found for this signature in database
GPG key ID: 1545A01D4474BAF0

View file

@ -38,7 +38,7 @@ def parse_song_runs(runs):
else:
# note: YT uses non-breaking space \xa0 to separate number and magnitude
if re.match(r"^\d([^ ])* [^ ]*$", text):
if re.match(r"^\d([^ ])* [^ ]*$", text) and i > 0:
parsed['views'] = text.split(' ')[0]
elif re.match(r"^(\d+:)*\d+:\d+$", text):