[dispeak] Improve FLV extraction (closes #13513)

This commit is contained in:
Ben Rog-Wilhelm 2021-04-17 23:15:10 -05:00 committed by Sergey M․
parent fe05191b8c
commit b8645c1f58
No known key found for this signature in database
GPG key ID: 2C393E0F18A9236D

View file

@ -32,6 +32,14 @@ class DigitallySpeakingIE(InfoExtractor):
# From http://www.gdcvault.com/play/1013700/Advanced-Material # From http://www.gdcvault.com/play/1013700/Advanced-Material
'url': 'http://sevt.dispeak.com/ubm/gdc/eur10/xml/11256_1282118587281VNIT.xml', 'url': 'http://sevt.dispeak.com/ubm/gdc/eur10/xml/11256_1282118587281VNIT.xml',
'only_matching': True, 'only_matching': True,
}, {
# From https://gdcvault.com/play/1016624
'url': 'https://sevt.dispeak.com/ubm/gdc/online12/xml/201210-822101_1349794556671DDDD.xml',
'info_dict': {
'id': '201210-822101_1349794556671DDDD',
'ext': 'flv',
'title': 'Pre-launch - Preparing to Take the Plunge',
},
}] }]
def _parse_mp4(self, metadata): def _parse_mp4(self, metadata):
@ -84,26 +92,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):