aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/nhl.py
diff options
context:
space:
mode:
authorYen Chi Hsuan <yan12125@gmail.com>2015-05-08 03:09:19 +0800
committerYen Chi Hsuan <yan12125@gmail.com>2015-05-08 03:11:25 +0800
commit7ef00afe9da87c7d0fdbea93af39b47d5447f1a0 (patch)
tree78d74dd2509a44337c1621364d4c7c336bf80d10 /youtube_dl/extractor/nhl.py
parent156fc83a55b14258bb4a2fa1ec3b02d4db679603 (diff)
[nhl] Support RTMP videos (fixes #4481)
Diffstat (limited to 'youtube_dl/extractor/nhl.py')
-rw-r--r--youtube_dl/extractor/nhl.py23
1 files changed, 22 insertions, 1 deletions
diff --git a/youtube_dl/extractor/nhl.py b/youtube_dl/extractor/nhl.py
index b572370c2..279b18386 100644
--- a/youtube_dl/extractor/nhl.py
+++ b/youtube_dl/extractor/nhl.py
@@ -50,7 +50,7 @@ class NHLBaseInfoExtractor(InfoExtractor):
video_url = initial_video_url
join = compat_urlparse.urljoin
- return {
+ ret = {
'id': video_id,
'title': info['name'],
'url': video_url,
@@ -59,6 +59,15 @@ class NHLBaseInfoExtractor(InfoExtractor):
'thumbnail': join(join(video_url, '/u/'), info['bigImage']),
'upload_date': unified_strdate(info['releaseDate'].split('.')[0]),
}
+ if video_url.startswith('rtmp:'):
+ mobj = re.match(r'(?P<tc_url>rtmp://[^/]+/(?P<app>[a-z0-9/]+))/(?P<play_path>mp4:.*)', video_url)
+ ret.update({
+ 'tc_url': mobj.group('tc_url'),
+ 'play_path': mobj.group('play_path'),
+ 'app': mobj.group('app'),
+ 'no_resume': True,
+ })
+ return ret
class NHLIE(NHLBaseInfoExtractor):
@@ -115,6 +124,18 @@ class NHLIE(NHLBaseInfoExtractor):
'duration': 268,
'upload_date': '20141122',
}
+ }, {
+ 'url': 'http://video.oilers.nhl.com/videocenter/console?id=691469&catid=4',
+ 'info_dict': {
+ 'id': '691469',
+ 'ext': 'mp4',
+ 'title': 'RAW | Craig MacTavish Full Press Conference',
+ 'description': 'Oilers GM Craig MacTavish addresses the media at Rexall Place on Friday.',
+ 'upload_date': '20141205',
+ },
+ 'params': {
+ 'skip_download': True, # Requires rtmpdump
+ }
}]
def _real_extract(self, url):