0
0
Fork 0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2024-11-30 03:33:02 +00:00

[nhl] Add support for embedded URLs

This commit is contained in:
Sergey M․ 2015-09-24 23:48:23 +06:00
parent 05b476a270
commit 9fbd4b35a2

View file

@ -72,7 +72,7 @@ def _extract_video(self, info):
class NHLIE(NHLBaseInfoExtractor): class NHLIE(NHLBaseInfoExtractor):
IE_NAME = 'nhl.com' IE_NAME = 'nhl.com'
_VALID_URL = r'https?://video(?P<team>\.[^.]*)?\.nhl\.com/videocenter/(?:console)?(?:\?(?:.*?[?&])?)(?:id|hlg)=(?P<id>[-0-9a-zA-Z,]+)' _VALID_URL = r'https?://video(?P<team>\.[^.]*)?\.nhl\.com/videocenter/(?:console|embed)?(?:\?(?:.*?[?&])?)(?:id|hlg|playlist)=(?P<id>[-0-9a-zA-Z,]+)'
_TESTS = [{ _TESTS = [{
'url': 'http://video.canucks.nhl.com/videocenter/console?catid=6?id=453614', 'url': 'http://video.canucks.nhl.com/videocenter/console?catid=6?id=453614',
@ -136,6 +136,9 @@ class NHLIE(NHLBaseInfoExtractor):
'params': { 'params': {
'skip_download': True, # Requires rtmpdump 'skip_download': True, # Requires rtmpdump
} }
}, {
'url': 'http://video.nhl.com/videocenter/embed?playlist=836127',
'only_matching': True,
}] }]
def _real_extract(self, url): def _real_extract(self, url):