- if protocol == 'HTTP-HDS':
- formats.extend(self._extract_f4m_formats(
- asset_url + '?hdcore=3.4.0', media_id,
- f4m_id=format_id, fatal=False))
- elif protocol == 'HTTP-HLS':
- formats.extend(self._extract_m3u8_formats(
- asset_url, media_id, 'mp4', 'm3u8_native',
- m3u8_id=format_id, fatal=False))
+ if protocol.startswith('HTTP-HDS') or protocol.startswith('HTTP-HLS'):
+ asset_url = self._get_tokenized_src(asset_url, media_id, format_id)
+ if protocol.startswith('HTTP-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'):
+ formats.extend(self._extract_m3u8_formats(
+ asset_url, media_id, 'mp4', 'm3u8_native',
+ m3u8_id=format_id, fatal=False))