]> asedeno.scripts.mit.edu Git - youtube-dl.git/commitdiff
[ntvru] Rename from NTV to clarify the difference between n-tv.de and ntv.ru
authorPhilipp Hagemeister <phihag@phihag.de>
Mon, 2 Feb 2015 19:43:02 +0000 (20:43 +0100)
committerPhilipp Hagemeister <phihag@phihag.de>
Mon, 2 Feb 2015 19:43:02 +0000 (20:43 +0100)
youtube_dl/extractor/__init__.py
youtube_dl/extractor/ntvru.py [moved from youtube_dl/extractor/ntv.py with 97% similarity]

index dabf86ec88c758ec97713f5706ba803220d81744..bd707e0286b093ba869263bdb583d3934ed499db 100644 (file)
@@ -317,7 +317,7 @@ from .nrk import (
     NRKIE,
     NRKTVIE,
 )
-from .ntv import NTVIE
+from .ntvru import NTVRuIE
 from .nytimes import NYTimesIE
 from .nuvid import NuvidIE
 from .oktoberfesttv import OktoberfestTVIE
similarity index 97%
rename from youtube_dl/extractor/ntv.py
rename to youtube_dl/extractor/ntvru.py
index ee740cd9c0fe71a48b79aee00c40ea610e81ea99..8b9166d486222e1b2f7e05d6e0108294e26d70a5 100644 (file)
@@ -9,7 +9,7 @@ from ..utils import (
 )
 
 
-class NTVIE(InfoExtractor):
+class NTVRuIE(InfoExtractor):
     _VALID_URL = r'http://(?:www\.)?ntv\.ru/(?P<id>.+)'
 
     _TESTS = [
@@ -92,9 +92,7 @@ class NTVIE(InfoExtractor):
     ]
 
     def _real_extract(self, url):
-        mobj = re.match(self._VALID_URL, url)
-        video_id = mobj.group('id')
-
+        video_id = self._match_id(url)
         page = self._download_webpage(url, video_id)
 
         video_id = self._html_search_regex(self._VIDEO_ID_REGEXES, page, 'video id')