aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/YoutubeDL.py
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2016-03-28 03:13:39 +0600
committerSergey M․ <dstftw@gmail.com>2016-03-28 03:13:39 +0600
commit33f3040a3e611f45ad920bd06030691910ddf815 (patch)
tree90ccd922813cfd38d5cad0f132654f6e5b5c8dc2 /youtube_dl/YoutubeDL.py
parent03442072c0890f10043d1de25dc3c3fcaf10f4eb (diff)
[YoutubeDL] Fix sanitizing subtitles' url
Diffstat (limited to 'youtube_dl/YoutubeDL.py')
-rwxr-xr-xyoutube_dl/YoutubeDL.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/youtube_dl/YoutubeDL.py b/youtube_dl/YoutubeDL.py
index 53a36c145..d7aa951ff 100755
--- a/youtube_dl/YoutubeDL.py
+++ b/youtube_dl/YoutubeDL.py
@@ -1265,7 +1265,8 @@ class YoutubeDL(object):
if subtitles:
for _, subtitle in subtitles.items():
for subtitle_format in subtitle:
- subtitle_format['url'] = sanitize_url(subtitle_format['url'])
+ if subtitle_format.get('url'):
+ subtitle_format['url'] = sanitize_url(subtitle_format['url'])
if 'ext' not in subtitle_format:
subtitle_format['ext'] = determine_ext(subtitle_format['url']).lower()