mirror of
https://codeberg.org/polarisfm/youtube-dl
synced 2024-11-23 00:54:31 +01:00
[extractor/common] Improve jwplayer subtitles extraction (closes #15695)
This commit is contained in:
parent
300148b48a
commit
f4b7427279
@ -2353,7 +2353,10 @@ class InfoExtractor(object):
|
|||||||
for track in tracks:
|
for track in tracks:
|
||||||
if not isinstance(track, dict):
|
if not isinstance(track, dict):
|
||||||
continue
|
continue
|
||||||
if track.get('kind') != 'captions':
|
track_kind = track.get('kind')
|
||||||
|
if not track_kind or not isinstance(track_kind, compat_str):
|
||||||
|
continue
|
||||||
|
if track_kind.lower() not in ('captions', 'subtitles'):
|
||||||
continue
|
continue
|
||||||
track_url = urljoin(base_url, track.get('file'))
|
track_url = urljoin(base_url, track.get('file'))
|
||||||
if not track_url:
|
if not track_url:
|
||||||
|
Loading…
Reference in New Issue
Block a user