1
0
mirror of https://github.com/l1ving/youtube-dl synced 2024-12-31 00:52:52 +08:00

[nba] Improve _VALID_URL regex (fixes #4387)

Allows for optional trailing / or /index.html
This commit is contained in:
cryptonaut 2014-12-06 01:42:58 -08:00
parent 0df23ba9f9
commit 1a9f8b1ad4

View File

@ -10,7 +10,7 @@ from ..utils import (
class NBAIE(InfoExtractor): class NBAIE(InfoExtractor):
_VALID_URL = r'https?://(?:watch\.|www\.)?nba\.com/(?:nba/)?video(?P<id>/[^?]*?)(?:/index\.html)?(?:\?.*)?$' _VALID_URL = r'https?://(?:watch\.|www\.)?nba\.com/(?:nba/)?video(?P<id>/[^?]*?)/?(?:/index\.html)?(?:\?.*)?$'
_TEST = { _TEST = {
'url': 'http://www.nba.com/video/games/nets/2012/12/04/0021200253-okc-bkn-recap.nba/index.html', 'url': 'http://www.nba.com/video/games/nets/2012/12/04/0021200253-okc-bkn-recap.nba/index.html',
'md5': 'c0edcfc37607344e2ff8f13c378c88a4', 'md5': 'c0edcfc37607344e2ff8f13c378c88a4',