Fix watch_playlist byline (closes #54)
This commit is contained in:
parent
8bb62b9cae
commit
6b51e11bb4
2 changed files with 2 additions and 2 deletions
|
|
@ -43,7 +43,7 @@ class TestYTMusic(unittest.TestCase):
|
||||||
results = youtube.get_artist("UCmMUZbaYdNH0bEd1PAlAqsA")
|
results = youtube.get_artist("UCmMUZbaYdNH0bEd1PAlAqsA")
|
||||||
self.assertEqual(len(results), 11)
|
self.assertEqual(len(results), 11)
|
||||||
results = youtube.get_artist("UCLZ7tlKC06ResyDmEStSrOw") # no album year
|
results = youtube.get_artist("UCLZ7tlKC06ResyDmEStSrOw") # no album year
|
||||||
self.assertGreaterEqual(len(results), 10)
|
self.assertGreaterEqual(len(results), 9)
|
||||||
results = youtube.get_artist(
|
results = youtube.get_artist(
|
||||||
"UCDAPd3S5CBIEKXn-tvy57Lg") # no thumbnail, albums, subscribe count
|
"UCDAPd3S5CBIEKXn-tvy57Lg") # no thumbnail, albums, subscribe count
|
||||||
self.assertGreaterEqual(len(results), 9)
|
self.assertGreaterEqual(len(results), 9)
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ def parse_watch_playlist(results):
|
||||||
continue
|
continue
|
||||||
track = {
|
track = {
|
||||||
'title': nav(data, TITLE_TEXT),
|
'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']),
|
'length': nav(data, ['lengthText', 'runs', 0, 'text']),
|
||||||
'videoId': data['videoId'],
|
'videoId': data['videoId'],
|
||||||
'playlistId': nav(data, NAVIGATION_PLAYLIST_ID),
|
'playlistId': nav(data, NAVIGATION_PLAYLIST_ID),
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue