properly determine separator for artists runs on videos (closes #254)
This commit is contained in:
parent
64276bc85e
commit
7bc65ba15c
1 changed files with 6 additions and 1 deletions
|
|
@ -180,10 +180,15 @@ def parse_single(result):
|
|||
|
||||
def parse_video(result):
|
||||
runs = result['subtitle']['runs']
|
||||
artists_len = len(runs)
|
||||
try:
|
||||
artists_len = runs.index({'text': ' • '})
|
||||
except ValueError:
|
||||
pass
|
||||
video = {
|
||||
'title': nav(result, TITLE_TEXT),
|
||||
'videoId': nav(result, NAVIGATION_VIDEO_ID),
|
||||
'artists': parse_song_artists_runs(runs[:-2]),
|
||||
'artists': parse_song_artists_runs(runs[:artists_len]),
|
||||
'playlistId': nav(result, NAVIGATION_PLAYLIST_ID, True),
|
||||
'thumbnails': nav(result, THUMBNAIL_RENDERER, True)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue