Skip to content

Commit

Permalink
fix run parsing - artist mistaken as views (closes #313)
Browse files Browse the repository at this point in the history
  • Loading branch information
sigma67 committed Nov 3, 2022
1 parent 2965004 commit d48951f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ytmusicapi/parsers/songs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit d48951f

Please sign in to comment.