aboutsummaryrefslogtreecommitdiffstats
path: root/youtube/yt_data_extract.py
diff options
context:
space:
mode:
authorJames Taylor <user234683@users.noreply.github.com>2019-07-04 18:08:14 -0700
committerJames Taylor <user234683@users.noreply.github.com>2019-07-04 18:08:14 -0700
commitd105d4520ff0bf529cfb18c9c16a22900ab7f481 (patch)
tree0d10795631c55ccd57e0710b1007a81b635f866e /youtube/yt_data_extract.py
parent1c724f4f28804f3f8e41d222576e6fc5d7e68f75 (diff)
downloadyt-local-d105d4520ff0bf529cfb18c9c16a22900ab7f481.tar.lz
yt-local-d105d4520ff0bf529cfb18c9c16a22900ab7f481.tar.xz
yt-local-d105d4520ff0bf529cfb18c9c16a22900ab7f481.zip
Convert playlist page to flask framework
Diffstat (limited to 'youtube/yt_data_extract.py')
-rw-r--r--youtube/yt_data_extract.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/youtube/yt_data_extract.py b/youtube/yt_data_extract.py
index a487c57..a42b6a2 100644
--- a/youtube/yt_data_extract.py
+++ b/youtube/yt_data_extract.py
@@ -200,12 +200,12 @@ def renderer_info(renderer, additional_info={}):
info.update(additional_info)
- if type.startswith('compact'):
+ if type.startswith('compact') or type.startswith('playlist') or type.startswith('grid'):
info['item_size'] = 'small'
else:
info['item_size'] = 'medium'
- if type in ('compactVideoRenderer', 'videoRenderer', 'gridVideoRenderer'):
+ if type in ('compactVideoRenderer', 'videoRenderer', 'playlistVideoRenderer', 'gridVideoRenderer'):
info['type'] = 'video'
elif type in ('playlistRenderer', 'compactPlaylistRenderer', 'gridPlaylistRenderer',
'radioRenderer', 'compactRadioRenderer', 'gridRadioRenderer',
@@ -213,6 +213,8 @@ def renderer_info(renderer, additional_info={}):
info['type'] = 'playlist'
elif type == 'channelRenderer':
info['type'] = 'channel'
+ elif type == 'playlistHeaderRenderer':
+ info['type'] = 'playlist_metadata'
else:
info['type'] = 'unsupported'
return info