prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN 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
  
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `youtube_dl/extractor/nba.py`
  Content:
  ```
  1 from __future__ import unicode_literals
  2 
  3 import re
  4 
  5 from .common import InfoExtractor
  6 from ..utils import (
  7     remove_end,
  8     parse_duration,
  9 )
  10 
  11 
  12 class NBAIE(InfoExtractor):
  13     _VALID_URL = r'https?://(?:watch\.|www\.)?nba\.com/(?:nba/)?video(?P<id>/[^?]*?)(?:/index\.html)?(?:\?.*)?$'
  14     _TEST = {
  15         'url': 'http://www.nba.com/video/games/nets/2012/12/04/0021200253-okc-bkn-recap.nba/index.html',
  16         'md5': 'c0edcfc37607344e2ff8f13c378c88a4',
  17         'info_dict': {
  18             'id': '0021200253-okc-bkn-recap.nba',
  19             'ext': 'mp4',
  20             'title': 'Thunder vs. Nets',
  21             'description': 'Kevin Durant scores 32 points and dishes out six assists as the Thunder beat the Nets in Brooklyn.',
  22             'duration': 181,
  23         },
  24     }
  25 
  26     def _real_extract(self, url):
  27         mobj = re.match(self._VALID_URL, url)
  28         video_id = mobj.group('id')
  29 
  30         webpage = self._download_webpage(url, video_id)
  31 
  32         video_url = 'http://ht-mobile.cdn.turner.com/nba/big' + video_id + '_nba_1280x720.mp4'
  33 
  34         shortened_video_id = video_id.rpartition('/')[2]
  35         title = remove_end(
  36             self._og_search_title(webpage, default=shortened_video_id), ' : NBA.com')
  37 
  38         description = self._og_search_description(webpage)
  39         duration = parse_duration(
  40             self._html_search_meta('duration', webpage, 'duration', fatal=False))
  41 
  42         return {
  43             'id': shortened_video_id,
  44             'url': video_url,
  45             'title': title,
  46             'description': description,
  47             'duration': duration,
  48         }
  49
  ```
  --- END FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
golden_diff: 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',
  
verification_info: {"golden_diff": "diff --git a/youtube_dl/extractor/nba.py b/youtube_dl/extractor/nba.py\n--- a/youtube_dl/extractor/nba.py\n+++ b/youtube_dl/extractor/nba.py\n@@ -10,7 +10,7 @@\n \n \n class NBAIE(InfoExtractor):\n-    _VALID_URL = r'https?://(?:watch\\.|www\\.)?nba\\.com/(?:nba/)?video(?P<id>/[^?]*?)(?:/index\\.html)?(?:\\?.*)?$'\n+    _VALID_URL = r'https?://(?:watch\\.|www\\.)?nba\\.com/(?:nba/)?video(?P<id>/[^?]*?)/?(?:/index\\.html)?(?:\\?.*)?$'\n     _TEST = {\n         'url': 'http://www.nba.com/video/games/nets/2012/12/04/0021200253-okc-bkn-recap.nba/index.html',\n         'md5': 'c0edcfc37607344e2ff8f13c378c88a4',\n", "issue": "NBA URLs FAIL without INDEX.HTML\nthe NBA extractor does not work if URL does not explicitly end with index.html  (which appears to be the default)\n\nURL: http://www.nba.com/video/games/hornets/2014/12/05/0021400276-nyk-cha-play5.nba/\n\nC:>youtube-dl -v http://www.nba.com/video/games/hornets/2014/12/05/0021400276-n\nyk-cha-play5.nba/\n[debug] System config: []\n[debug] User config: []\n[debug] Command-line args: ['-v', 'http://www.nba.com/video/games/hornets/2014/1\n2/05/0021400276-nyk-cha-play5.nba/']\n[debug] Encodings: locale cp1252, fs mbcs, out cp850, pref cp1252\n[debug] youtube-dl version 2014.12.06.1\n[debug] Python version 2.7.8 - Windows-7-6.1.7601-SP1\n[debug] exe versions: ffmpeg N-40824-\n[debug] Proxy map: {}\n[NBA] /games/hornets/2014/12/05/0021400276-nyk-cha-play5.nba/: Downloading webpa\nge\n[debug] Invoking downloader on u'http://ht-mobile.cdn.turner.com/nba/big/games/h\nornets/2014/12/05/0021400276-nyk-cha-play5.nba/_nba_1280x720.mp4'\nERROR: unable to download video data: HTTP Error 404: Not Found\nTraceback (most recent call last):\n  File \"youtube_dl\\YoutubeDL.pyo\", line 1091, in process_info\n  File \"youtube_dl\\YoutubeDL.pyo\", line 1067, in dl\n  File \"youtube_dl\\downloader\\common.pyo\", line 294, in download\n  File \"youtube_dl\\downloader\\http.pyo\", line 66, in real_download\n  File \"youtube_dl\\YoutubeDL.pyo\", line 1325, in urlopen\n  File \"urllib2.pyo\", line 410, in open\n  File \"urllib2.pyo\", line 523, in http_response\n  File \"urllib2.pyo\", line 448, in error\n  File \"urllib2.pyo\", line 382, in _call_chain\n  File \"urllib2.pyo\", line 531, in http_error_default\nHTTPError: HTTP Error 404: Not Found\n\n(same vid but with index.html)\nURL: http://www.nba.com/video/games/hornets/2014/12/05/0021400276-nyk-cha-play5.nba/index.html\n\nC:>youtube-dl -v http://www.nba.com/video/games/hornets/2014/12/05/0021400276-n\nyk-cha-play5.nba/index.html\n[debug] System config: []\n[debug] User config: []\n[debug] Command-line args: ['-v', 'http://www.nba.com/video/games/hornets/2014/1\n2/05/0021400276-nyk-cha-play5.nba/index.html']\n[debug] Encodings: locale cp1252, fs mbcs, out cp850, pref cp1252\n[debug] youtube-dl version 2014.12.06.1\n[debug] Python version 2.7.8 - Windows-7-6.1.7601-SP1\n[debug] exe versions: ffmpeg N-40824-\n[debug] Proxy map: {}\n[NBA] /games/hornets/2014/12/05/0021400276-nyk-cha-play5.nba: Downloading webpag\ne\n[debug] Invoking downloader on u'http://ht-mobile.cdn.turner.com/nba/big/games/h\nornets/2014/12/05/0021400276-nyk-cha-play5.nba_nba_1280x720.mp4'\n[download] Destination: Walker From Behind-0021400276-nyk-cha-play5.nba.mp4\n[download] 100% of 5.76MiB in 00:04\n\n", "before_files": [{"content": "from __future__ import unicode_literals\n\nimport re\n\nfrom .common import InfoExtractor\nfrom ..utils import (\n    remove_end,\n    parse_duration,\n)\n\n\nclass NBAIE(InfoExtractor):\n    _VALID_URL = r'https?://(?:watch\\.|www\\.)?nba\\.com/(?:nba/)?video(?P<id>/[^?]*?)(?:/index\\.html)?(?:\\?.*)?$'\n    _TEST = {\n        'url': 'http://www.nba.com/video/games/nets/2012/12/04/0021200253-okc-bkn-recap.nba/index.html',\n        'md5': 'c0edcfc37607344e2ff8f13c378c88a4',\n        'info_dict': {\n            'id': '0021200253-okc-bkn-recap.nba',\n            'ext': 'mp4',\n            'title': 'Thunder vs. Nets',\n            'description': 'Kevin Durant scores 32 points and dishes out six assists as the Thunder beat the Nets in Brooklyn.',\n            'duration': 181,\n        },\n    }\n\n    def _real_extract(self, url):\n        mobj = re.match(self._VALID_URL, url)\n        video_id = mobj.group('id')\n\n        webpage = self._download_webpage(url, video_id)\n\n        video_url = 'http://ht-mobile.cdn.turner.com/nba/big' + video_id + '_nba_1280x720.mp4'\n\n        shortened_video_id = video_id.rpartition('/')[2]\n        title = remove_end(\n            self._og_search_title(webpage, default=shortened_video_id), ' : NBA.com')\n\n        description = self._og_search_description(webpage)\n        duration = parse_duration(\n            self._html_search_meta('duration', webpage, 'duration', fatal=False))\n\n        return {\n            'id': shortened_video_id,\n            'url': video_url,\n            'title': title,\n            'description': description,\n            'duration': duration,\n        }\n", "path": "youtube_dl/extractor/nba.py"}], "after_files": [{"content": "from __future__ import unicode_literals\n\nimport re\n\nfrom .common import InfoExtractor\nfrom ..utils import (\n    remove_end,\n    parse_duration,\n)\n\n\nclass NBAIE(InfoExtractor):\n    _VALID_URL = r'https?://(?:watch\\.|www\\.)?nba\\.com/(?:nba/)?video(?P<id>/[^?]*?)/?(?:/index\\.html)?(?:\\?.*)?$'\n    _TEST = {\n        'url': 'http://www.nba.com/video/games/nets/2012/12/04/0021200253-okc-bkn-recap.nba/index.html',\n        'md5': 'c0edcfc37607344e2ff8f13c378c88a4',\n        'info_dict': {\n            'id': '0021200253-okc-bkn-recap.nba',\n            'ext': 'mp4',\n            'title': 'Thunder vs. Nets',\n            'description': 'Kevin Durant scores 32 points and dishes out six assists as the Thunder beat the Nets in Brooklyn.',\n            'duration': 181,\n        },\n    }\n\n    def _real_extract(self, url):\n        mobj = re.match(self._VALID_URL, url)\n        video_id = mobj.group('id')\n\n        webpage = self._download_webpage(url, video_id)\n\n        video_url = 'http://ht-mobile.cdn.turner.com/nba/big' + video_id + '_nba_1280x720.mp4'\n\n        shortened_video_id = video_id.rpartition('/')[2]\n        title = remove_end(\n            self._og_search_title(webpage, default=shortened_video_id), ' : NBA.com')\n\n        description = self._og_search_description(webpage)\n        duration = parse_duration(\n            self._html_search_meta('duration', webpage, 'duration', fatal=False))\n\n        return {\n            'id': shortened_video_id,\n            'url': video_url,\n            'title': title,\n            'description': description,\n            'duration': duration,\n        }\n", "path": "youtube_dl/extractor/nba.py"}]}