Fix watch_playlist byline (closes #54)

This commit is contained in:
sigma67 2020-08-06 14:32:53 +02:00
commit 6b51e11bb4
No known key found for this signature in database
GPG key ID: 1545A01D4474BAF0
2 changed files with 2 additions and 2 deletions

View file

@ -43,7 +43,7 @@ class TestYTMusic(unittest.TestCase):
results = youtube.get_artist("UCmMUZbaYdNH0bEd1PAlAqsA")
self.assertEqual(len(results), 11)
results = youtube.get_artist("UCLZ7tlKC06ResyDmEStSrOw") # no album year
self.assertGreaterEqual(len(results), 10)
self.assertGreaterEqual(len(results), 9)
results = youtube.get_artist(
"UCDAPd3S5CBIEKXn-tvy57Lg") # no thumbnail, albums, subscribe count
self.assertGreaterEqual(len(results), 9)

View file

@ -11,7 +11,7 @@ def parse_watch_playlist(results):
continue
track = {
'title': nav(data, TITLE_TEXT),
'byline': nav(data, ['longBylineText', 'runs', 0, 'text']),
'byline': nav(data, ['shortBylineText', 'runs', 0, 'text'], True),
'length': nav(data, ['lengthText', 'runs', 0, 'text']),
'videoId': data['videoId'],
'playlistId': nav(data, NAVIGATION_PLAYLIST_ID),