From b91edee61c6e94164f4523c2897dd771871834bd Mon Sep 17 00:00:00 2001 From: James Taylor Date: Wed, 28 Oct 2020 18:37:40 -0700 Subject: watch: Fix exception in to_valid_filename when video title is None --- youtube/watch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'youtube/watch.py') diff --git a/youtube/watch.py b/youtube/watch.py index bc2008c..34deb01 100644 --- a/youtube/watch.py +++ b/youtube/watch.py @@ -400,7 +400,7 @@ def get_watch_page(video_id=None): # Add video title to end of url path so it has a filename other than just # "videoplayback" when downloaded - title = urllib.parse.quote(util.to_valid_filename(info['title'])) + title = urllib.parse.quote(util.to_valid_filename(info['title'] or '')) for fmt in info['formats']: filename = title ext = fmt.get('ext') -- cgit v1.2.3