Add get_artist_albums (closes #4)
This commit also circumvents an issue with get_artist, where the API sometimes fails to return songs.
This commit is contained in:
parent
e96c4f1ca8
commit
4a653c5285
5 changed files with 64 additions and 17 deletions
|
|
@ -131,11 +131,11 @@ def parse_search_result(data, resultType = None):
|
|||
return search_result
|
||||
|
||||
|
||||
def get_item_text(item, index):
|
||||
def get_item_text(item, index, run_index=0):
|
||||
if 'runs' not in item['flexColumns'][index]['musicResponsiveListItemFlexColumnRenderer']['text']:
|
||||
return None
|
||||
|
||||
return item['flexColumns'][index]['musicResponsiveListItemFlexColumnRenderer']['text']['runs'][0]['text']
|
||||
return item['flexColumns'][index]['musicResponsiveListItemFlexColumnRenderer']['text']['runs'][run_index]['text']
|
||||
|
||||
|
||||
def prepare_browse_endpoint(type, browseId):
|
||||
|
|
|
|||
Loading…
Reference in a new issue