aboutsummaryrefslogtreecommitdiffhomepage
path: root/youtube_dl/extractor/spiegel.py
diff options
context:
space:
mode:
authorPhilipp Hagemeister <[email protected]>2014-11-13 14:45:17 +0100
committerPhilipp Hagemeister <[email protected]>2014-11-13 14:45:17 +0100
commit0e15e725a09e04b8ba47ac7ddfe7d26683db584c (patch)
treef58e4d9e96eccf2a60b8ad909f9739922b9a76e4 /youtube_dl/extractor/spiegel.py
parent2d42905b6863cab63d6ce456cb2e0de865bb6950 (diff)
downloadyoutube-dl-0e15e725a09e04b8ba47ac7ddfe7d26683db584c.tar.gz
youtube-dl-0e15e725a09e04b8ba47ac7ddfe7d26683db584c.zip
[spiegel] Modernize
Diffstat (limited to 'youtube_dl/extractor/spiegel.py')
-rw-r--r--youtube_dl/extractor/spiegel.py9
1 files changed, 3 insertions, 6 deletions
diff --git a/youtube_dl/extractor/spiegel.py b/youtube_dl/extractor/spiegel.py
index 9ed7d3b39..4b4da43d1 100644
--- a/youtube_dl/extractor/spiegel.py
+++ b/youtube_dl/extractor/spiegel.py
@@ -8,7 +8,7 @@ from ..utils import compat_urlparse
class SpiegelIE(InfoExtractor):
- _VALID_URL = r'https?://(?:www\.)?spiegel\.de/video/[^/]*-(?P<videoID>[0-9]+)(?:\.html)?(?:#.*)?$'
+ _VALID_URL = r'https?://(?:www\.)?spiegel\.de/video/[^/]*-(?P<id>[0-9]+)(?:\.html)?(?:#.*)?$'
_TESTS = [{
'url': 'http://www.spiegel.de/video/vulkan-tungurahua-in-ecuador-ist-wieder-aktiv-video-1259285.html',
'md5': '2c2754212136f35fb4b19767d242f66e',
@@ -32,9 +32,7 @@ class SpiegelIE(InfoExtractor):
}]
def _real_extract(self, url):
- m = re.match(self._VALID_URL, url)
- video_id = m.group('videoID')
-
+ video_id = self._match_id(url)
webpage = self._download_webpage(url, video_id)
title = self._html_search_regex(
@@ -90,8 +88,7 @@ class SpiegelArticleIE(InfoExtractor):
}
def _real_extract(self, url):
- m = re.match(self._VALID_URL, url)
- video_id = m.group('id')
+ video_id = self._match_id(url)
webpage = self._download_webpage(url, video_id)
video_link = self._search_regex(