1
0
mirror of https://codeberg.org/polarisfm/youtube-dl synced 2024-11-29 19:47:54 +01:00

Support uncommon DigitallySpeaking case

This commit is contained in:
Ben Rog-Wilhelm 2019-05-12 23:45:23 -07:00
parent a277dd33eb
commit 3f6a8ef4f9

View File

@ -84,26 +84,28 @@ class DigitallySpeakingIE(InfoExtractor):
'vcodec': 'none', 'vcodec': 'none',
'format_id': audio.get('code'), 'format_id': audio.get('code'),
}) })
slide_video_path = xpath_text(metadata, './slideVideo', fatal=True) slide_video_path = xpath_text(metadata, './slideVideo')
formats.append({ if slide_video_path:
'url': 'rtmp://%s/ondemand?ovpfv=1.1' % akamai_url, formats.append({
'play_path': remove_end(slide_video_path, '.flv'), 'url': 'rtmp://%s/ondemand?ovpfv=1.1' % akamai_url,
'ext': 'flv', 'play_path': remove_end(slide_video_path, '.flv'),
'format_note': 'slide deck video', 'ext': 'flv',
'quality': -2, 'format_note': 'slide deck video',
'preference': -2, 'quality': -2,
'format_id': 'slides', 'preference': -2,
}) 'format_id': 'slides',
speaker_video_path = xpath_text(metadata, './speakerVideo', fatal=True) })
formats.append({ speaker_video_path = xpath_text(metadata, './speakerVideo')
'url': 'rtmp://%s/ondemand?ovpfv=1.1' % akamai_url, if speaker_video_path:
'play_path': remove_end(speaker_video_path, '.flv'), formats.append({
'ext': 'flv', 'url': 'rtmp://%s/ondemand?ovpfv=1.1' % akamai_url,
'format_note': 'speaker video', 'play_path': remove_end(speaker_video_path, '.flv'),
'quality': -1, 'ext': 'flv',
'preference': -1, 'format_note': 'speaker video',
'format_id': 'speaker', 'quality': -1,
}) 'preference': -1,
'format_id': 'speaker',
})
return formats return formats
def _real_extract(self, url): def _real_extract(self, url):