mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-27 01:31:25 +01:00
Compare commits
6 Commits
d2f6d72652
...
6a49380201
Author | SHA1 | Date | |
---|---|---|---|
|
6a49380201 | ||
|
fb127cccd2 | ||
|
50306a11eb | ||
|
deab7eb786 | ||
|
a70f889927 | ||
|
a746212d7b |
|
@ -1,4 +1,5 @@
|
|||
from .common import InfoExtractor
|
||||
from ..compat import compat_urllib_parse_urlparse
|
||||
from ..utils import (
|
||||
ExtractorError,
|
||||
clean_html,
|
||||
|
@ -276,8 +277,16 @@ class VidioLiveIE(VidioBaseIE):
|
|||
display_id, note='Downloading HLS token JSON', data=b'')
|
||||
formats.extend(self._extract_m3u8_formats(
|
||||
sources['source'] + '?' + token_json.get('token', ''), display_id, 'mp4', 'm3u8_native'))
|
||||
if str_or_none(sources.get('source_dash')):
|
||||
pass
|
||||
if str_or_none(sources.get('source_dash')): # TODO: Find live example with source_dash
|
||||
parsed_base_dash = compat_urllib_parse_urlparse(sources['source_dash'])
|
||||
token_json = self._download_json(
|
||||
'https://www.vidio.com/live/%s/tokens?type=dash' % video_id,
|
||||
display_id, note='Downloading DASH token JSON', data=b'')
|
||||
parsed_tokenized_dash = parsed_base_dash._replace(path=token_json.get('token', '')
|
||||
+ (parsed_base_dash.path if parsed_base_dash.path[0] == '/'
|
||||
else '/' + parsed_base_dash.path))
|
||||
formats.extend(self._extract_mpd_formats(
|
||||
parsed_tokenized_dash.geturl(), display_id, 'dash'))
|
||||
else:
|
||||
if stream_meta.get('stream_token_url'):
|
||||
token_json = self._download_json(
|
||||
|
@ -287,7 +296,15 @@ class VidioLiveIE(VidioBaseIE):
|
|||
stream_meta['stream_token_url'] + '?' + token_json.get('token', ''),
|
||||
display_id, 'mp4', 'm3u8_native'))
|
||||
if stream_meta.get('stream_dash_url'):
|
||||
pass
|
||||
parsed_base_dash = compat_urllib_parse_urlparse(stream_meta['stream_dash_url'])
|
||||
token_json = self._download_json(
|
||||
'https://www.vidio.com/live/%s/tokens?type=dash' % video_id,
|
||||
display_id, note='Downloading DASH token JSON', data=b'')
|
||||
parsed_tokenized_dash = parsed_base_dash._replace(path=token_json.get('token', '')
|
||||
+ (parsed_base_dash.path if parsed_base_dash.path[0] == '/'
|
||||
else '/' + parsed_base_dash.path))
|
||||
formats.extend(self._extract_mpd_formats(
|
||||
parsed_tokenized_dash.geturl(), display_id, 'dash'))
|
||||
if stream_meta.get('stream_url'):
|
||||
formats.extend(self._extract_m3u8_formats(
|
||||
stream_meta['stream_url'], display_id, 'mp4', 'm3u8_native'))
|
||||
|
|
Loading…
Reference in New Issue
Block a user