remove browse endpoint request keys that are no longer used
This commit is contained in:
parent
1f8e34cb31
commit
72661fe1ff
4 changed files with 5 additions and 16 deletions
|
|
@ -9,17 +9,6 @@ import locale
|
|||
from ytmusicapi.constants import *
|
||||
|
||||
|
||||
def prepare_browse_endpoint(type, browseId):
|
||||
return {
|
||||
'browseEndpointContextSupportedConfigs': {
|
||||
"browseEndpointContextMusicConfig": {
|
||||
"pageType": "MUSIC_PAGE_TYPE_" + type
|
||||
}
|
||||
},
|
||||
'browseId': browseId
|
||||
}
|
||||
|
||||
|
||||
def prepare_like_endpoint(rating):
|
||||
if rating == 'LIKE':
|
||||
return 'like/like'
|
||||
|
|
|
|||
|
|
@ -275,7 +275,7 @@ class BrowsingMixin:
|
|||
"""
|
||||
if channelId.startswith("MPLA"):
|
||||
channelId = channelId[4:]
|
||||
body = prepare_browse_endpoint("ARTIST", channelId)
|
||||
body = {'browseId': channelId}
|
||||
endpoint = 'browse'
|
||||
response = self._send_request(endpoint, body)
|
||||
results = nav(response, SINGLE_COLUMN_TAB + SECTION_LIST)
|
||||
|
|
@ -461,7 +461,7 @@ class BrowsingMixin:
|
|||
]
|
||||
}
|
||||
"""
|
||||
body = prepare_browse_endpoint("ALBUM", browseId)
|
||||
body = {'browseId': browseId}
|
||||
endpoint = 'browse'
|
||||
response = self._send_request(endpoint, body)
|
||||
album = {}
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ class PlaylistsMixin:
|
|||
needed for moving/removing playlist items
|
||||
"""
|
||||
browseId = "VL" + playlistId if not playlistId.startswith("VL") else playlistId
|
||||
body = prepare_browse_endpoint("PLAYLIST", browseId)
|
||||
body = {'browseId': browseId}
|
||||
endpoint = 'browse'
|
||||
response = self._send_request(endpoint, body)
|
||||
results = nav(response,
|
||||
|
|
|
|||
|
|
@ -126,7 +126,7 @@ class UploadsMixin:
|
|||
]
|
||||
"""
|
||||
self._check_auth()
|
||||
body = prepare_browse_endpoint("ARTIST", browseId)
|
||||
body = {'browseId': browseId}
|
||||
endpoint = 'browse'
|
||||
response = self._send_request(endpoint, body)
|
||||
results = nav(response, SINGLE_COLUMN_TAB + SECTION_LIST_ITEM + MUSIC_SHELF)
|
||||
|
|
@ -177,7 +177,7 @@ class UploadsMixin:
|
|||
},
|
||||
"""
|
||||
self._check_auth()
|
||||
body = prepare_browse_endpoint("ALBUM", browseId)
|
||||
body = {'browseId': browseId}
|
||||
endpoint = 'browse'
|
||||
response = self._send_request(endpoint, body)
|
||||
album = parse_album_header(response)
|
||||
|
|
|
|||
Loading…
Reference in a new issue