소스 검색

[ntvru] Rename from NTV to clarify the difference between n-tv.de and ntv.ru

Philipp Hagemeister 10 년 전
부모
커밋
3fd45e03bf
2개의 변경된 파일3개의 추가작업 그리고 5개의 파일을 삭제
  1. 1 1
      youtube_dl/extractor/__init__.py
  2. 2 4
      youtube_dl/extractor/ntvru.py

+ 1 - 1
youtube_dl/extractor/__init__.py

@@ -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

+ 2 - 4
youtube_dl/extractor/ntv.py → youtube_dl/extractor/ntvru.py

@@ -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')