From 1ce500b8a22619b4205596024cf7cbb50af7ae42 Mon Sep 17 00:00:00 2001 From: James Taylor Date: Thu, 15 Aug 2019 16:30:05 -0700 Subject: Regression: Fix error when playlist has no description --- youtube/playlist.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'youtube') diff --git a/youtube/playlist.py b/youtube/playlist.py index 5df7074..3e5b0d2 100644 --- a/youtube/playlist.py +++ b/youtube/playlist.py @@ -101,6 +101,9 @@ def get_playlist_page(): metadata = yt_data_extract.renderer_info(first_page_json['response']['header']) yt_data_extract.prefix_urls(metadata) + if 'description' not in metadata: + metadata['description'] = '' + video_count = int(metadata['size'].replace(',', '')) metadata['size'] += ' videos' -- cgit v1.2.3