aboutsummaryrefslogtreecommitdiffstats
path: root/youtube/watch.py
diff options
context:
space:
mode:
authorJames Taylor <user234683@users.noreply.github.com>2020-10-28 18:37:40 -0700
committerJames Taylor <user234683@users.noreply.github.com>2020-10-28 18:37:40 -0700
commitb91edee61c6e94164f4523c2897dd771871834bd (patch)
treee72d6557db543d6290389656b9cee0f93e89178a /youtube/watch.py
parent8abfe150f0ccc73e392312f92ee2c527e570343b (diff)
downloadyt-local-b91edee61c6e94164f4523c2897dd771871834bd.tar.lz
yt-local-b91edee61c6e94164f4523c2897dd771871834bd.tar.xz
yt-local-b91edee61c6e94164f4523c2897dd771871834bd.zip
watch: Fix exception in to_valid_filename when video title is None
Diffstat (limited to 'youtube/watch.py')
-rw-r--r--youtube/watch.py2
1 files changed, 1 insertions, 1 deletions
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')