mirror of
https://github.com/l1ving/youtube-dl
synced 2025-03-13 15:37:45 +08:00
[tv2hu] formats extended with http protocol
This commit is contained in:
parent
f56bb72e7c
commit
537abfbbc5
@ -72,6 +72,21 @@ class TV2HUIE(InfoExtractor):
|
|||||||
formats = self._extract_m3u8_formats(
|
formats = self._extract_m3u8_formats(
|
||||||
manifest_url, video_id, 'mp4', entry_protocol='m3u8_native')
|
manifest_url, video_id, 'mp4', entry_protocol='m3u8_native')
|
||||||
|
|
||||||
|
# skip first, 'auto' format, same as 3rd (360p)
|
||||||
|
for i in range(len(json_data['bitrates']['mp4'])-1):
|
||||||
|
quality = str_to_int(json_data['mp4Labels'][i+1][:-1])
|
||||||
|
|
||||||
|
formats.append({
|
||||||
|
'protocol': 'http',
|
||||||
|
'url': json_data['bitrates']['mp4'][i+1],
|
||||||
|
'height': quality,
|
||||||
|
'width': quality/9*16,
|
||||||
|
'ext': 'mp4',
|
||||||
|
'format_id': json_data['mp4Labels'][i+1],
|
||||||
|
'format_note': 'HTTP',
|
||||||
|
'preference': str_to_int(json_data['mp4Labels'][i+1][:-1])
|
||||||
|
})
|
||||||
|
|
||||||
self._sort_formats(formats)
|
self._sort_formats(formats)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user