From: Sergey M․ Date: Sun, 27 Mar 2016 21:13:39 +0000 (+0600) Subject: [YoutubeDL] Fix sanitizing subtitles' url X-Git-Url: https://git.cielonegro.org/gitweb.cgi?a=commitdiff_plain;h=33f3040a3e611f45ad920bd06030691910ddf815;p=youtube-dl.git [YoutubeDL] Fix sanitizing subtitles' url --- 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()