1
0
Fork 0
mirror of https://github.com/blackjack4494/yt-dlc.git synced 2024-12-24 08:45:27 +00:00

[nhl] Match videos without catid (Fixes #3764)

This commit is contained in:
Philipp Hagemeister 2014-09-16 10:08:34 +02:00
parent 37a81dff04
commit 7bb5df1cda

View file

@ -46,9 +46,9 @@ class NHLBaseInfoExtractor(InfoExtractor):
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=(?P<id>[0-9]+)' _VALID_URL = r'https?://video(?P<team>\.[^.]*)?\.nhl\.com/videocenter/console(?:\?(?:.*?[?&])?)id=(?P<id>[0-9]+)'
_TEST = { _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',
'info_dict': { 'info_dict': {
'id': '453614', 'id': '453614',
@ -58,7 +58,10 @@ class NHLIE(NHLBaseInfoExtractor):
'duration': 18, 'duration': 18,
'upload_date': '20131006', 'upload_date': '20131006',
}, },
} }, {
'url': 'http://video.flames.nhl.com/videocenter/console?id=630616',
'only_matching': True,
}]
def _real_extract(self, url): def _real_extract(self, url):
mobj = re.match(self._VALID_URL, url) mobj = re.match(self._VALID_URL, url)