mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-16 12:21:25 +01:00
Compare commits
2 Commits
02bfd8ffdc
...
74e5aa6902
Author | SHA1 | Date | |
---|---|---|---|
|
74e5aa6902 | ||
|
89199aedbe |
|
@ -1,4 +1,5 @@
|
||||||
from .common import InfoExtractor
|
from .common import InfoExtractor
|
||||||
|
from ..networking import HEADRequest
|
||||||
from ..utils import (
|
from ..utils import (
|
||||||
float_or_none,
|
float_or_none,
|
||||||
int_or_none,
|
int_or_none,
|
||||||
|
@ -100,8 +101,12 @@ class RedCDNLivxIE(InfoExtractor):
|
||||||
ism_doc, ism_urlh = ism_res
|
ism_doc, ism_urlh = ism_res
|
||||||
formats, _ = self._parse_ism_formats_and_subtitles(ism_doc, ism_urlh.url, 'ss')
|
formats, _ = self._parse_ism_formats_and_subtitles(ism_doc, ism_urlh.url, 'ss')
|
||||||
|
|
||||||
|
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({
|
formats.append({
|
||||||
'url': livx_mode('nvr'),
|
'url': nvr_urlh.url,
|
||||||
'ext': 'flv',
|
'ext': 'flv',
|
||||||
'format_id': 'direct-0',
|
'format_id': 'direct-0',
|
||||||
'preference': -1, # might be slow
|
'preference': -1, # might be slow
|
||||||
|
|
|
@ -168,9 +168,9 @@ class SejmIE(InfoExtractor):
|
||||||
return
|
return
|
||||||
file = f'https:{file}' if file.startswith('//') else file
|
file = f'https:{file}' if file.startswith('//') else file
|
||||||
if not legacy_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:
|
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')
|
stream_id = self._search_regex(r'/o2/sejm/([^/]+)/[^./]+\.livx', file, 'stream id')
|
||||||
common_info = {
|
common_info = {
|
||||||
'url': file,
|
'url': file,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user