aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/dispeak.py
diff options
context:
space:
mode:
authorYen Chi Hsuan <yan12125@gmail.com>2016-04-21 19:46:32 +0800
committerYen Chi Hsuan <yan12125@gmail.com>2016-04-21 19:47:10 +0800
commit442c4d361f309f64176f2c1b053ea8775701634c (patch)
tree1acfb075b3cf7da99b4f0a74599c26dc9b53ac4b /youtube_dl/extractor/dispeak.py
parentec59d657e7d898cce8f3a1b6556a79fd9495fc9d (diff)
downloadyoutube-dl-442c4d361f309f64176f2c1b053ea8775701634c.tar.xz
[dispeak/gdcvault] Add the test case from #5784
Diffstat (limited to 'youtube_dl/extractor/dispeak.py')
-rw-r--r--youtube_dl/extractor/dispeak.py29
1 files changed, 16 insertions, 13 deletions
diff --git a/youtube_dl/extractor/dispeak.py b/youtube_dl/extractor/dispeak.py
index 6ebc3255a..c74fa7e07 100644
--- a/youtube_dl/extractor/dispeak.py
+++ b/youtube_dl/extractor/dispeak.py
@@ -13,9 +13,9 @@ from ..utils import (
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
'url': 'http://evt.dispeak.com/ubm/gdc/sf16/xml/840376_BQRC.xml',
'md5': 'a8efb6c31ed06ca8739294960b2dbabd',
@@ -24,7 +24,11 @@ class DigitalSpeakingIE(InfoExtractor):
'ext': 'mp4',
'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):
video_formats = []
@@ -60,16 +64,15 @@ class DigitalSpeakingIE(InfoExtractor):
def _parse_flv(self, metadata):
formats = []
akamai_url = xpath_text(metadata, './akamaiHost', fatal=True)
- audios = metadata.find('./audios')
- if audios is not None:
- for audio in audios:
- formats.append({
- 'url': 'rtmp://%s/ondemand?ovpfv=1.1' % akamai_url,
- 'play_path': remove_end(audio.get('url'), '.flv'),
- 'ext': 'flv',
- 'vcodec': 'none',
- 'format_id': audio.get('code'),
- })
+ audios = metadata.findall('./audios/audio')
+ for audio in audios:
+ formats.append({
+ 'url': 'rtmp://%s/ondemand?ovpfv=1.1' % akamai_url,
+ 'play_path': remove_end(audio.get('url'), '.flv'),
+ 'ext': 'flv',
+ 'vcodec': 'none',
+ 'format_id': audio.get('code'),
+ })
slide_video_path = xpath_text(metadata, './slideVideo', fatal=True)
formats.append({
'url': 'rtmp://%s/ondemand?ovpfv=1.1' % akamai_url,