Repository: ytdl-org/youtube-dl

Issue:
NBA URLs FAIL without INDEX.HTML
the NBA extractor does not work if URL does not explicitly end with index.html  (which appears to be the default)

URL: http://www.nba.com/video/games/hornets/2014/12/05/0021400276-nyk-cha-play5.nba/

C:>youtube-dl -v http://www.nba.com/video/games/hornets/2014/12/05/0021400276-n
yk-cha-play5.nba/
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['-v', 'http://www.nba.com/video/games/hornets/2014/1
2/05/0021400276-nyk-cha-play5.nba/']
[debug] Encodings: locale cp1252, fs mbcs, out cp850, pref cp1252
[debug] youtube-dl version 2014.12.06.1
[debug] Python version 2.7.8 - Windows-7-6.1.7601-SP1
[debug] exe versions: ffmpeg N-40824-
[debug] Proxy map: {}
[NBA] /games/hornets/2014/12/05/0021400276-nyk-cha-play5.nba/: Downloading webpa
ge
[debug] Invoking downloader on u'http://ht-mobile.cdn.turner.com/nba/big/games/h
ornets/2014/12/05/0021400276-nyk-cha-play5.nba/_nba_1280x720.mp4'
ERROR: unable to download video data: HTTP Error 404: Not Found
Traceback (most recent call last):
  File "youtube_dl\YoutubeDL.pyo", line 1091, in process_info
  File "youtube_dl\YoutubeDL.pyo", line 1067, in dl
  File "youtube_dl\downloader\common.pyo", line 294, in download
  File "youtube_dl\downloader\http.pyo", line 66, in real_download
  File "youtube_dl\YoutubeDL.pyo", line 1325, in urlopen
  File "urllib2.pyo", line 410, in open
  File "urllib2.pyo", line 523, in http_response
  File "urllib2.pyo", line 448, in error
  File "urllib2.pyo", line 382, in _call_chain
  File "urllib2.pyo", line 531, in http_error_default
HTTPError: HTTP Error 404: Not Found

(same vid but with index.html)
URL: http://www.nba.com/video/games/hornets/2014/12/05/0021400276-nyk-cha-play5.nba/index.html

C:>youtube-dl -v http://www.nba.com/video/games/hornets/2014/12/05/0021400276-n
yk-cha-play5.nba/index.html
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['-v', 'http://www.nba.com/video/games/hornets/2014/1
2/05/0021400276-nyk-cha-play5.nba/index.html']
[debug] Encodings: locale cp1252, fs mbcs, out cp850, pref cp1252
[debug] youtube-dl version 2014.12.06.1
[debug] Python version 2.7.8 - Windows-7-6.1.7601-SP1
[debug] exe versions: ffmpeg N-40824-
[debug] Proxy map: {}
[NBA] /games/hornets/2014/12/05/0021400276-nyk-cha-play5.nba: Downloading webpag
e
[debug] Invoking downloader on u'http://ht-mobile.cdn.turner.com/nba/big/games/h
ornets/2014/12/05/0021400276-nyk-cha-play5.nba_nba_1280x720.mp4'
[download] Destination: Walker From Behind-0021400276-nyk-cha-play5.nba.mp4
[download] 100% of 5.76MiB in 00:04



Discussion:

Resolving patch:
diff --git a/youtube_dl/extractor/nba.py b/youtube_dl/extractor/nba.py
--- a/youtube_dl/extractor/nba.py
+++ b/youtube_dl/extractor/nba.py
@@ -10,7 +10,7 @@
 
 
 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 = {
         'url': 'http://www.nba.com/video/games/nets/2012/12/04/0021200253-okc-bkn-recap.nba/index.html',
         'md5': 'c0edcfc37607344e2ff8f13c378c88a4',


Test patch: