mirror of
https://github.com/yt-dlp/yt-dlp
synced 2024-12-27 21:59:17 +01:00
[youtube:tab] Minor improvements (See desc)
* Support shorts on channel homepage * Extract thumbnail of OLAK playlists
This commit is contained in:
parent
ad210f4fd4
commit
a17526e427
1 changed files with 4 additions and 3 deletions
|
@ -3777,7 +3777,7 @@ class YoutubeTabBaseInfoExtractor(YoutubeBaseInfoExtractor):
|
||||||
def _extract_basic_item_renderer(item):
|
def _extract_basic_item_renderer(item):
|
||||||
# Modified from _extract_grid_item_renderer
|
# Modified from _extract_grid_item_renderer
|
||||||
known_basic_renderers = (
|
known_basic_renderers = (
|
||||||
'playlistRenderer', 'videoRenderer', 'channelRenderer', 'showRenderer'
|
'playlistRenderer', 'videoRenderer', 'channelRenderer', 'showRenderer', 'reelItemRenderer'
|
||||||
)
|
)
|
||||||
for key, renderer in item.items():
|
for key, renderer in item.items():
|
||||||
if not isinstance(renderer, dict):
|
if not isinstance(renderer, dict):
|
||||||
|
@ -3992,7 +3992,8 @@ class YoutubeTabBaseInfoExtractor(YoutubeBaseInfoExtractor):
|
||||||
known_renderers = {
|
known_renderers = {
|
||||||
'playlistVideoListRenderer': self._playlist_entries,
|
'playlistVideoListRenderer': self._playlist_entries,
|
||||||
'gridRenderer': self._grid_entries,
|
'gridRenderer': self._grid_entries,
|
||||||
'shelfRenderer': lambda x: self._shelf_entries(x),
|
'reelShelfRenderer': self._grid_entries,
|
||||||
|
'shelfRenderer': self._shelf_entries,
|
||||||
'musicResponsiveListItemRenderer': lambda x: [self._music_reponsive_list_entry(x)],
|
'musicResponsiveListItemRenderer': lambda x: [self._music_reponsive_list_entry(x)],
|
||||||
'backstagePostThreadRenderer': self._post_thread_entries,
|
'backstagePostThreadRenderer': self._post_thread_entries,
|
||||||
'videoRenderer': lambda x: [self._video_entry(x)],
|
'videoRenderer': lambda x: [self._video_entry(x)],
|
||||||
|
@ -4170,7 +4171,7 @@ class YoutubeTabBaseInfoExtractor(YoutubeBaseInfoExtractor):
|
||||||
})
|
})
|
||||||
|
|
||||||
primary_thumbnails = self._extract_thumbnails(
|
primary_thumbnails = self._extract_thumbnails(
|
||||||
primary_sidebar_renderer, ('thumbnailRenderer', 'playlistVideoThumbnailRenderer', 'thumbnail'))
|
primary_sidebar_renderer, ('thumbnailRenderer', ('playlistVideoThumbnailRenderer', 'playlistCustomThumbnailRenderer'), 'thumbnail'))
|
||||||
|
|
||||||
if playlist_id is None:
|
if playlist_id is None:
|
||||||
playlist_id = item_id
|
playlist_id = item_id
|
||||||
|
|
Loading…
Reference in a new issue