Remove get_artist_songs (get_playlist_items can be used for this purpose) (#4)
This commit is contained in:
parent
49e67c77fc
commit
4f963b6ba1
1 changed files with 55 additions and 61 deletions
|
|
@ -166,54 +166,54 @@ class YTMusic:
|
||||||
|
|
||||||
:param channelId: channel id of the artist
|
:param channelId: channel id of the artist
|
||||||
:return: Detailed information about the artist and
|
:return: Detailed information about the artist and
|
||||||
their songs, albums, singles and videos. Example:
|
their songs, albums, singles and videos. Example::
|
||||||
|
|
||||||
{
|
{
|
||||||
"name": "Oasis"
|
"name": "Oasis",
|
||||||
"description": "Oasis were ...",
|
"description": "Oasis were ...",
|
||||||
"views": "1,838,795,605",
|
"views": "1,838,795,605",
|
||||||
"songs": {
|
"songs": {
|
||||||
"browseId": "VLPLMpM3Z0118S42R1npOhcjoakLIv1aqnS1",
|
"browseId": "VLPLMpM3Z0118S42R1npOhcjoakLIv1aqnS1",
|
||||||
"results": [
|
"results": [
|
||||||
{
|
{
|
||||||
"videoId": "ZrOKjDZOtkA",
|
"videoId": "ZrOKjDZOtkA",
|
||||||
"title": "Wonderwall (Remastered)",
|
"title": "Wonderwall (Remastered)",
|
||||||
"artist": "Oasis",
|
"artist": "Oasis",
|
||||||
"album": "(What's The Story) Morning Glory? (Remastered)"
|
"album": "(What's The Story) Morning Glory? (Remastered)"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"albums": {
|
"albums": {
|
||||||
"results": [
|
"results": [
|
||||||
{
|
{
|
||||||
"title": "Familiar To Millions",
|
"title": "Familiar To Millions",
|
||||||
"year": "2018",
|
"year": "2018",
|
||||||
"browseId": "MPREb_AYetWMZunqA"
|
"browseId": "MPREb_AYetWMZunqA"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"browseId": "UCmMUZbaYdNH0bEd1PAlAqsA"
|
"browseId": "UCmMUZbaYdNH0bEd1PAlAqsA"
|
||||||
},
|
},
|
||||||
"singles": {
|
"singles": {
|
||||||
"results": [
|
"results": [
|
||||||
{
|
{
|
||||||
"title": "Stand By Me (Mustique Demo)",
|
"title": "Stand By Me (Mustique Demo)",
|
||||||
"year": "2016",
|
"year": "2016",
|
||||||
"browseId": "MPREb_7MPKLhibN5G"
|
"browseId": "MPREb_7MPKLhibN5G"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"browseId": "UCmMUZbaYdNH0bEd1PAlAqsA"
|
"browseId": "UCmMUZbaYdNH0bEd1PAlAqsA"
|
||||||
},
|
},
|
||||||
"videos": {
|
"videos": {
|
||||||
"results": [
|
"results": [
|
||||||
{
|
{
|
||||||
"title": "Wonderwall",
|
"title": "Wonderwall",
|
||||||
"views": "358M",
|
"views": "358M",
|
||||||
"videoId": "bx1Bh8ZvH84",
|
"videoId": "bx1Bh8ZvH84",
|
||||||
"playlistId": "PLMpM3Z0118S5xuNckw1HUcj1D021AnMEB"
|
"playlistId": "PLMpM3Z0118S5xuNckw1HUcj1D021AnMEB"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"browseId": "VLPLMpM3Z0118S5xuNckw1HUcj1D021AnMEB"
|
"browseId": "VLPLMpM3Z0118S5xuNckw1HUcj1D021AnMEB"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
@ -257,12 +257,6 @@ class YTMusic:
|
||||||
|
|
||||||
return artist
|
return artist
|
||||||
|
|
||||||
def get_artist_songs(self, playlistId):
|
|
||||||
body = {"browseId": playlistId}
|
|
||||||
endpoint = 'browse'
|
|
||||||
response = self.__send_request(endpoint, body)
|
|
||||||
pass
|
|
||||||
|
|
||||||
def get_artist_albums(self, channelId, params):
|
def get_artist_albums(self, channelId, params):
|
||||||
body = {"browseId": channelId, "params": params}
|
body = {"browseId": channelId, "params": params}
|
||||||
endpoint = 'browse'
|
endpoint = 'browse'
|
||||||
|
|
@ -275,17 +269,17 @@ class YTMusic:
|
||||||
|
|
||||||
:param browseId: browseId of the album, for example
|
:param browseId: browseId of the album, for example
|
||||||
returned by :py:func:`search`
|
returned by :py:func:`search`
|
||||||
:return: Dictionary with title, description, artist and tracks
|
:return: Dictionary with title, description, artist and tracks.
|
||||||
|
|
||||||
Each track is in the following format:
|
Each track is in the following format::
|
||||||
|
|
||||||
{
|
{
|
||||||
"index": "1",
|
"index": "1",
|
||||||
"title": "WIEE (feat. Mesto)",
|
"title": "WIEE (feat. Mesto)",
|
||||||
"artists": "Martin Garrix",
|
"artists": "Martin Garrix",
|
||||||
"videoId": "8xMNeXI9wxI",
|
"videoId": "8xMNeXI9wxI",
|
||||||
"lengthMs": "203406"
|
"lengthMs": "203406"
|
||||||
}
|
}
|
||||||
|
|
||||||
"""
|
"""
|
||||||
body = prepare_browse_endpoint("ALBUM", browseId)
|
body = prepare_browse_endpoint("ALBUM", browseId)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue