diff options
author | Sergey M․ <dstftw@gmail.com> | 2016-01-26 21:29:42 +0600 |
---|---|---|
committer | Sergey M․ <dstftw@gmail.com> | 2016-01-26 21:29:42 +0600 |
commit | af9c2a07aea530b3bee560a953e94ac92fcd49c9 (patch) | |
tree | 7776f39226437582eb95bd949494772ebd3345ba /youtube_dl | |
parent | ab180fc648d331643aaf340c3cf7e92bcbb10bce (diff) | |
download | youtube-dl-af9c2a07aea530b3bee560a953e94ac92fcd49c9.tar.xz |
[cspan] Extract from path when no qualities (Closes #8317)
Diffstat (limited to 'youtube_dl')
-rw-r--r-- | youtube_dl/extractor/cspan.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/youtube_dl/extractor/cspan.py b/youtube_dl/extractor/cspan.py index f78cbbd7e..b78edf729 100644 --- a/youtube_dl/extractor/cspan.py +++ b/youtube_dl/extractor/cspan.py @@ -112,6 +112,13 @@ class CSpanIE(InfoExtractor): 'height': int_or_none(get_text_attr(quality, 'height')), 'tbr': int_or_none(get_text_attr(quality, 'bitrate')), }) + if not formats: + path = get_text_attr(f, 'path') + if not path: + continue + formats = self._extract_m3u8_formats( + path, video_id, 'mp4', entry_protocol='m3u8_native', + m3u8_id='hls') if determine_ext(path) == 'm3u8' else [{'url': path, }] self._sort_formats(formats) entries.append({ 'id': '%s_%d' % (video_id, partnum + 1), |