mirror of
https://github.com/l1ving/youtube-dl
synced 2025-01-26 17:45:35 +08:00
fix issue #9157
This commit is contained in:
parent
4fdf082375
commit
6a72c82d95
@ -107,15 +107,12 @@ class RaiTVIE(InfoExtractor):
|
||||
return xml.replace(' tag elementi', '').replace('>/', '</')
|
||||
|
||||
relinker = self._download_xml(
|
||||
media['mediaUri'] + '&output=43',
|
||||
media['mediaUri'] + '&output=44',
|
||||
video_id, transform_source=fix_xml)
|
||||
|
||||
has_subtitle = False
|
||||
|
||||
for element in relinker.findall('element'):
|
||||
media_url = xpath_text(element, 'url')
|
||||
media_url = relinker.findtext('url')
|
||||
ext = determine_ext(media_url)
|
||||
content_type = xpath_text(element, 'content-type')
|
||||
content_type = relinker.findtext('ct')
|
||||
if ext == 'm3u8':
|
||||
formats.extend(self._extract_m3u8_formats(
|
||||
media_url, video_id, 'mp4', 'm3u8_native',
|
||||
@ -127,7 +124,7 @@ class RaiTVIE(InfoExtractor):
|
||||
elif ext == 'stl':
|
||||
has_subtitle = True
|
||||
elif content_type.startswith('video/'):
|
||||
bitrate = int_or_none(xpath_text(element, 'bitrate'))
|
||||
bitrate = int_or_none(relinker.findtext('bitrate'))
|
||||
formats.append({
|
||||
'url': media_url,
|
||||
'tbr': bitrate if bitrate > 0 else None,
|
||||
|
Loading…
Reference in New Issue
Block a user