fix get_charts fallback
This commit is contained in:
parent
07f690b8ae
commit
9b0d4de7cc
2 changed files with 2 additions and 2 deletions
|
|
@ -27,7 +27,6 @@ PAGE_TYPE = [
|
||||||
WATCH_VIDEO_ID = ['watchEndpoint', 'videoId']
|
WATCH_VIDEO_ID = ['watchEndpoint', 'videoId']
|
||||||
NAVIGATION_VIDEO_ID = ['navigationEndpoint'] + WATCH_VIDEO_ID
|
NAVIGATION_VIDEO_ID = ['navigationEndpoint'] + WATCH_VIDEO_ID
|
||||||
QUEUE_VIDEO_ID = ['queueAddEndpoint','queueTarget','videoId']
|
QUEUE_VIDEO_ID = ['queueAddEndpoint','queueTarget','videoId']
|
||||||
NAVIGATION_VIDEO_ID_2 = MENU_ITEMS+[0]+MENU_SERVICE+QUEUE_VIDEO_ID
|
|
||||||
NAVIGATION_PLAYLIST_ID = ['navigationEndpoint', 'watchEndpoint', 'playlistId']
|
NAVIGATION_PLAYLIST_ID = ['navigationEndpoint', 'watchEndpoint', 'playlistId']
|
||||||
NAVIGATION_WATCH_PLAYLIST_ID = ['navigationEndpoint', 'watchPlaylistEndpoint', 'playlistId']
|
NAVIGATION_WATCH_PLAYLIST_ID = ['navigationEndpoint', 'watchPlaylistEndpoint', 'playlistId']
|
||||||
NAVIGATION_VIDEO_TYPE = [
|
NAVIGATION_VIDEO_TYPE = [
|
||||||
|
|
|
||||||
|
|
@ -105,7 +105,8 @@ def parse_video(result):
|
||||||
artists_len = get_dot_separator_index(runs)
|
artists_len = get_dot_separator_index(runs)
|
||||||
videoId = nav(result, NAVIGATION_VIDEO_ID, True)
|
videoId = nav(result, NAVIGATION_VIDEO_ID, True)
|
||||||
if not videoId:
|
if not videoId:
|
||||||
videoId = nav(result, NAVIGATION_VIDEO_ID_2)
|
videoId = next(id for entry in nav(result, MENU_ITEMS)
|
||||||
|
if nav(entry, MENU_SERVICE + QUEUE_VIDEO_ID, True))
|
||||||
return {
|
return {
|
||||||
'title': nav(result, TITLE_TEXT),
|
'title': nav(result, TITLE_TEXT),
|
||||||
'videoId': videoId,
|
'videoId': videoId,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue