1
0
Fork 0
mirror of https://github.com/ytdl-org/youtube-dl.git synced 2024-11-22 10:11:52 +00:00

[turner] Skip invalid subtitles' URLs

This commit is contained in:
Sergey M․ 2016-08-29 22:44:15 +07:00
parent 3fb2a23029
commit 5a80e7b43a
No known key found for this signature in database
GPG key ID: 2C393E0F18A9236D

View file

@ -140,7 +140,7 @@ class TurnerBaseIE(InfoExtractor):
for source in video_data.findall('closedCaptions/source'): for source in video_data.findall('closedCaptions/source'):
for track in source.findall('track'): for track in source.findall('track'):
track_url = track.get('url') track_url = track.get('url')
if not track_url: if not isinstance(track_url, compat_str) or track_url.endswith('/big'):
continue continue
lang = track.get('lang') or track.get('label') or 'en' lang = track.get('lang') or track.get('label') or 'en'
subtitles.setdefault(lang, []).append({ subtitles.setdefault(lang, []).append({