Browse Source

[turner] Skip invalid subtitles' URLs

totalwebcasting
Sergey M․ 8 years ago
parent
commit
5a80e7b43a
No known key found for this signature in database GPG Key ID: 2C393E0F18A9236D
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      youtube_dl/extractor/turner.py

+ 1
- 1
youtube_dl/extractor/turner.py View File

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


Loading…
Cancel
Save