Make search() compatible with upload-bearing accounts
This commit is contained in:
parent
c9dd0192c7
commit
b3444c8700
1 changed files with 6 additions and 1 deletions
|
|
@ -101,7 +101,12 @@ class YTMusic:
|
||||||
response = self.__send_request(endpoint, body)
|
response = self.__send_request(endpoint, body)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
results = response['contents']['sectionListRenderer']['contents']
|
if 'tabbedSearchResultsRenderer' in response['contents']:
|
||||||
|
results = response['contents']['tabbedSearchResultsRenderer']['tabs'][0]['tabRenderer']['content']
|
||||||
|
else:
|
||||||
|
results = response['contents']
|
||||||
|
|
||||||
|
results = results['sectionListRenderer']['contents']
|
||||||
|
|
||||||
# no results
|
# no results
|
||||||
if len(results) == 1 and 'itemSectionRenderer' in results:
|
if len(results) == 1 and 'itemSectionRenderer' in results:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue