mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-16 20:31:25 +01:00
Compare commits
2 Commits
02bfd8ffdc
...
74e5aa6902
Author | SHA1 | Date | |
---|---|---|---|
|
74e5aa6902 | ||
|
89199aedbe |
|
@ -1,4 +1,5 @@
|
|||
from .common import InfoExtractor
|
||||
from ..networking import HEADRequest
|
||||
from ..utils import (
|
||||
float_or_none,
|
||||
int_or_none,
|
||||
|
@ -100,12 +101,16 @@ class RedCDNLivxIE(InfoExtractor):
|
|||
ism_doc, ism_urlh = ism_res
|
||||
formats, _ = self._parse_ism_formats_and_subtitles(ism_doc, ism_urlh.url, 'ss')
|
||||
|
||||
formats.append({
|
||||
'url': livx_mode('nvr'),
|
||||
'ext': 'flv',
|
||||
'format_id': 'direct-0',
|
||||
'preference': -1, # might be slow
|
||||
})
|
||||
nvr_urlh = self._request_webpage(
|
||||
HEADRequest(livx_mode('nvr')), video_id, 'Follow flv file redirect', fatal=False,
|
||||
expected_status=lambda _: True)
|
||||
if nvr_urlh and nvr_urlh.getcode() == 200:
|
||||
formats.append({
|
||||
'url': nvr_urlh.url,
|
||||
'ext': 'flv',
|
||||
'format_id': 'direct-0',
|
||||
'preference': -1, # might be slow
|
||||
})
|
||||
formats.extend(self._extract_mpd_formats(livx_mode('livedash'), video_id, mpd_id='dash', fatal=False))
|
||||
formats.extend(self._extract_m3u8_formats(
|
||||
livx_mode('livehls'), video_id, m3u8_id='hls', ext='mp4', fatal=False))
|
||||
|
|
|
@ -168,9 +168,9 @@ class SejmIE(InfoExtractor):
|
|||
return
|
||||
file = f'https:{file}' if file.startswith('//') else file
|
||||
if not legacy_file:
|
||||
update_url_query(file, {'startTime': start_time})
|
||||
file = update_url_query(file, {'startTime': start_time})
|
||||
if stop_time is not None:
|
||||
update_url_query(file, {'stopTime': stop_time})
|
||||
file = update_url_query(file, {'stopTime': stop_time})
|
||||
stream_id = self._search_regex(r'/o2/sejm/([^/]+)/[^./]+\.livx', file, 'stream id')
|
||||
common_info = {
|
||||
'url': file,
|
||||
|
|
Loading…
Reference in New Issue
Block a user