mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-26 02:55:17 +00:00
[dispeak/gdcvault] Add the test case from #5784
This commit is contained in:
parent
ec59d657e7
commit
442c4d361f
2 changed files with 30 additions and 13 deletions
|
@ -13,9 +13,9 @@
|
||||||
|
|
||||||
|
|
||||||
class DigitalSpeakingIE(InfoExtractor):
|
class DigitalSpeakingIE(InfoExtractor):
|
||||||
_VALID_URL = r'http://evt.dispeak.com/([^/]+/)+xml/(?P<id>[^.]+).xml'
|
_VALID_URL = r'http://(?:evt\.dispeak|events\.digitallyspeaking)\.com/([^/]+/)+xml/(?P<id>[^.]+).xml'
|
||||||
|
|
||||||
_TEST = {
|
_TESTS = [{
|
||||||
# From http://evt.dispeak.com/ubm/gdc/sf16/xml/840376_BQRC.xml
|
# From http://evt.dispeak.com/ubm/gdc/sf16/xml/840376_BQRC.xml
|
||||||
'url': 'http://evt.dispeak.com/ubm/gdc/sf16/xml/840376_BQRC.xml',
|
'url': 'http://evt.dispeak.com/ubm/gdc/sf16/xml/840376_BQRC.xml',
|
||||||
'md5': 'a8efb6c31ed06ca8739294960b2dbabd',
|
'md5': 'a8efb6c31ed06ca8739294960b2dbabd',
|
||||||
|
@ -24,7 +24,11 @@ class DigitalSpeakingIE(InfoExtractor):
|
||||||
'ext': 'mp4',
|
'ext': 'mp4',
|
||||||
'title': 'Tenacious Design and The Interface of \'Destiny\'',
|
'title': 'Tenacious Design and The Interface of \'Destiny\'',
|
||||||
},
|
},
|
||||||
}
|
}, {
|
||||||
|
# From http://www.gdcvault.com/play/1014631/Classic-Game-Postmortem-PAC
|
||||||
|
'url': 'http://events.digitallyspeaking.com/gdc/sf11/xml/12396_1299111843500GMPX.xml',
|
||||||
|
'only_matching': True,
|
||||||
|
}]
|
||||||
|
|
||||||
def _parse_mp4(self, metadata):
|
def _parse_mp4(self, metadata):
|
||||||
video_formats = []
|
video_formats = []
|
||||||
|
@ -60,16 +64,15 @@ def _parse_mp4(self, metadata):
|
||||||
def _parse_flv(self, metadata):
|
def _parse_flv(self, metadata):
|
||||||
formats = []
|
formats = []
|
||||||
akamai_url = xpath_text(metadata, './akamaiHost', fatal=True)
|
akamai_url = xpath_text(metadata, './akamaiHost', fatal=True)
|
||||||
audios = metadata.find('./audios')
|
audios = metadata.findall('./audios/audio')
|
||||||
if audios is not None:
|
for audio in audios:
|
||||||
for audio in audios:
|
formats.append({
|
||||||
formats.append({
|
'url': 'rtmp://%s/ondemand?ovpfv=1.1' % akamai_url,
|
||||||
'url': 'rtmp://%s/ondemand?ovpfv=1.1' % akamai_url,
|
'play_path': remove_end(audio.get('url'), '.flv'),
|
||||||
'play_path': remove_end(audio.get('url'), '.flv'),
|
'ext': 'flv',
|
||||||
'ext': 'flv',
|
'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', fatal=True)
|
||||||
formats.append({
|
formats.append({
|
||||||
'url': 'rtmp://%s/ondemand?ovpfv=1.1' % akamai_url,
|
'url': 'rtmp://%s/ondemand?ovpfv=1.1' % akamai_url,
|
||||||
|
|
|
@ -52,6 +52,7 @@ class GDCVaultIE(InfoExtractor):
|
||||||
'only_matching': True,
|
'only_matching': True,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
# Hard-coded hostname
|
||||||
'url': 'http://gdcvault.com/play/1023460/Tenacious-Design-and-The-Interface',
|
'url': 'http://gdcvault.com/play/1023460/Tenacious-Design-and-The-Interface',
|
||||||
'md5': 'a8efb6c31ed06ca8739294960b2dbabd',
|
'md5': 'a8efb6c31ed06ca8739294960b2dbabd',
|
||||||
'info_dict': {
|
'info_dict': {
|
||||||
|
@ -61,6 +62,19 @@ class GDCVaultIE(InfoExtractor):
|
||||||
'title': 'Tenacious Design and The Interface of \'Destiny\'',
|
'title': 'Tenacious Design and The Interface of \'Destiny\'',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
# Multiple audios
|
||||||
|
'url': 'http://www.gdcvault.com/play/1014631/Classic-Game-Postmortem-PAC',
|
||||||
|
'info_dict': {
|
||||||
|
'id': '1014631',
|
||||||
|
'ext': 'flv',
|
||||||
|
'title': 'How to Create a Good Game - From My Experience of Designing Pac-Man',
|
||||||
|
},
|
||||||
|
'params': {
|
||||||
|
'skip_download': True, # Requires rtmpdump
|
||||||
|
'format': 'jp', # The japanese audio
|
||||||
|
}
|
||||||
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
def _login(self, webpage_url, display_id):
|
def _login(self, webpage_url, display_id):
|
||||||
|
|
Loading…
Reference in a new issue