aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2015-02-02 20:43:02 +0100
committerPhilipp Hagemeister <phihag@phihag.de>2015-02-02 20:43:02 +0100
commit3fd45e03bf86c2ad2ef17362452a9a745dc10755 (patch)
tree7d970f399997379583fedd25c7c2bc3070ed8dba /youtube_dl
parent869b4aeff4239b02ff8f699741902fe7f91b999a (diff)
[ntvru] Rename from NTV to clarify the difference between n-tv.de and ntv.ru
Diffstat (limited to 'youtube_dl')
-rw-r--r--youtube_dl/extractor/__init__.py2
-rw-r--r--youtube_dl/extractor/ntvru.py (renamed from youtube_dl/extractor/ntv.py)6
2 files changed, 3 insertions, 5 deletions
diff --git a/youtube_dl/extractor/__init__.py b/youtube_dl/extractor/__init__.py
index dabf86ec8..bd707e028 100644
--- a/youtube_dl/extractor/__init__.py
+++ b/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
diff --git a/youtube_dl/extractor/ntv.py b/youtube_dl/extractor/ntvru.py
index ee740cd9c..8b9166d48 100644
--- a/youtube_dl/extractor/ntv.py
+++ b/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')