- r'(\d+)\.mp4', stream_url, 'tbr', default=None))
-
- def extract_format(stream_url, format_id, idx, query={}):
- format_info = self._download_json(
- stream_url, video_id,
- note='Download video info for format %s' % (format_id or '#%d' % idx),
- query=query)
- return {
- 'format_id': format_id,
- 'url': format_info['info'],
- 'ext': 'mp4',
- 'tbr': tbr,
- }
-
- formats.append(extract_format(
- stream_url, 'hls-%d' % tbr if tbr else None, idx * 2))
- formats.append(extract_format(stream_url.replace(
- '/playlist.m3u8', ''), 'http-%d' % tbr if tbr else None, idx * 2 + 1, {'pno': 1031}))
+ r'_(\d+)_mp4/', format_url, 'tbr', default=None))
+ formats.append({
+ 'format_id': compat_str(tbr or idx),
+ 'url': format_url,
+ 'ext': 'mp4',
+ 'tbr': tbr,
+ 'protocol': 'm3u8_native',
+ })