1
0
Fork 0
mirror of https://codeberg.org/polarisfm/youtube-dl.git synced 2024-12-22 15:52:27 +00:00

[YoutubeDL] Fix sanitizing subtitles' url

This commit is contained in:
Sergey M․ 2016-03-28 03:13:39 +06:00
parent 03442072c0
commit 33f3040a3e

View file

@ -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()