mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-15 12:53:18 +00:00
[mdr] Fix failed formats processing
This commit is contained in:
parent
dc519b5421
commit
76f0c50d3d
|
@ -96,8 +96,6 @@ def _real_extract(self, url):
|
||||||
vbr = int_or_none(xpath_text(asset, './bitrateVideo', 'vbr'), 1000)
|
vbr = int_or_none(xpath_text(asset, './bitrateVideo', 'vbr'), 1000)
|
||||||
abr = int_or_none(xpath_text(asset, './bitrateAudio', 'abr'), 1000)
|
abr = int_or_none(xpath_text(asset, './bitrateAudio', 'abr'), 1000)
|
||||||
|
|
||||||
url_formats = []
|
|
||||||
|
|
||||||
ext = determine_ext(url_el.text)
|
ext = determine_ext(url_el.text)
|
||||||
if ext == 'm3u8':
|
if ext == 'm3u8':
|
||||||
url_formats = self._extract_m3u8_formats(
|
url_formats = self._extract_m3u8_formats(
|
||||||
|
@ -130,7 +128,10 @@ def _real_extract(self, url):
|
||||||
'height': height,
|
'height': height,
|
||||||
})
|
})
|
||||||
|
|
||||||
url_formats.append(f)
|
url_formats = [f]
|
||||||
|
|
||||||
|
if not url_formats:
|
||||||
|
continue
|
||||||
|
|
||||||
if not vbr:
|
if not vbr:
|
||||||
for f in url_formats:
|
for f in url_formats:
|
||||||
|
@ -142,8 +143,8 @@ def _real_extract(self, url):
|
||||||
'vcodec': 'none',
|
'vcodec': 'none',
|
||||||
})
|
})
|
||||||
|
|
||||||
if url_formats:
|
|
||||||
formats.extend(url_formats)
|
formats.extend(url_formats)
|
||||||
|
|
||||||
self._sort_formats(formats)
|
self._sort_formats(formats)
|
||||||
|
|
||||||
description = xpath_text(doc, './broadcast/broadcastDescription', 'description')
|
description = xpath_text(doc, './broadcast/broadcastDescription', 'description')
|
||||||
|
|
Loading…
Reference in a new issue