1
0
mirror of https://github.com/l1ving/youtube-dl synced 2025-03-07 03:17:19 +08:00

select HTTPS stream sources instead of HTTP

This commit is contained in:
Viktor Szakats 2020-03-31 18:49:37 +00:00
parent 42a0081655
commit 2757da855b
No known key found for this signature in database
GPG Key ID: 9C01E9B68B91DE4D

View File

@ -75,13 +75,13 @@ class SRGSSRIE(InfoExtractor):
asset_url = asset['text']
quality = asset['@quality']
format_id = '%s-%s' % (protocol, quality)
if protocol.startswith('HTTP-HDS') or protocol.startswith('HTTP-HLS'):
if protocol.startswith('HTTPS-HDS') or protocol.startswith('HTTPS-HLS'):
asset_url = self._get_tokenized_src(asset_url, media_id, format_id)
if protocol.startswith('HTTP-HDS'):
if protocol.startswith('HTTPS-HDS'):
formats.extend(self._extract_f4m_formats(
asset_url + ('?' if '?' not in asset_url else '&') + 'hdcore=3.4.0',
media_id, f4m_id=format_id, fatal=False))
elif protocol.startswith('HTTP-HLS'):
elif protocol.startswith('HTTPS-HLS'):
formats.extend(self._extract_m3u8_formats(
asset_url, media_id, 'mp4', 'm3u8_native',
m3u8_id=format_id, fatal=False))