diff options
author | Jesús <heckyel@hyperbola.info> | 2021-10-18 15:24:21 -0500 |
---|---|---|
committer | Jesús <heckyel@hyperbola.info> | 2021-10-18 15:24:21 -0500 |
commit | 5122028a4bcac4ae577ef7fbd55ccad5cb34ef5e (patch) | |
tree | 65209bc739db35e31f1c9b5b868eb5df4fe12ae3 /hypervideo_dl/extractor/turner.py | |
parent | 27fe903c511691c078942bef5ee9a05a43b15c8f (diff) | |
download | hypervideo-5122028a4bcac4ae577ef7fbd55ccad5cb34ef5e.tar.lz hypervideo-5122028a4bcac4ae577ef7fbd55ccad5cb34ef5e.tar.xz hypervideo-5122028a4bcac4ae577ef7fbd55ccad5cb34ef5e.zip |
update from upstream
Diffstat (limited to 'hypervideo_dl/extractor/turner.py')
-rw-r--r-- | hypervideo_dl/extractor/turner.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/hypervideo_dl/extractor/turner.py b/hypervideo_dl/extractor/turner.py index 81229a5..32125bc 100644 --- a/hypervideo_dl/extractor/turner.py +++ b/hypervideo_dl/extractor/turner.py @@ -144,7 +144,7 @@ class TurnerBaseIE(AdobePassIE): m3u8_id=format_id or 'hls', fatal=False) if '/secure/' in video_url and '?hdnea=' in video_url: for f in m3u8_formats: - f['_seekable'] = False + f['_ffmpeg_args'] = ['-seekable', '0'] formats.extend(m3u8_formats) elif ext == 'f4m': formats.extend(self._extract_f4m_formats( @@ -221,6 +221,7 @@ class TurnerBaseIE(AdobePassIE): } def _extract_ngtv_info(self, media_id, tokenizer_query, ap_data=None): + is_live = ap_data.get('is_live') streams_data = self._download_json( 'http://medium.ngtv.io/media/%s/tv' % media_id, media_id)['media']['tv'] @@ -237,11 +238,11 @@ class TurnerBaseIE(AdobePassIE): 'http://token.ngtv.io/token/token_spe', m3u8_url, media_id, ap_data or {}, tokenizer_query) formats.extend(self._extract_m3u8_formats( - m3u8_url, media_id, 'mp4', m3u8_id='hls', fatal=False)) + m3u8_url, media_id, 'mp4', m3u8_id='hls', live=is_live, fatal=False)) duration = float_or_none(stream_data.get('totalRuntime')) - if not chapters: + if not chapters and not is_live: for chapter in stream_data.get('contentSegments', []): start_time = float_or_none(chapter.get('start')) chapter_duration = float_or_none(chapter.get('duration')) |