aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Taylor <user234683@users.noreply.github.com>2019-08-15 16:30:05 -0700
committerJames Taylor <user234683@users.noreply.github.com>2019-08-15 16:30:05 -0700
commit1ce500b8a22619b4205596024cf7cbb50af7ae42 (patch)
treeab40bf4c6e8450e7a5876e5da2ca565c142834be
parentadc40bc760345a23678a01f27d7697dfd3811914 (diff)
downloadyt-local-1ce500b8a22619b4205596024cf7cbb50af7ae42.tar.lz
yt-local-1ce500b8a22619b4205596024cf7cbb50af7ae42.tar.xz
yt-local-1ce500b8a22619b4205596024cf7cbb50af7ae42.zip
Regression: Fix error when playlist has no description
-rw-r--r--youtube/playlist.py3
1 files changed, 3 insertions, 0 deletions
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'