aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2016-05-01 06:57:19 +0600
committerSergey M․ <dstftw@gmail.com>2016-05-01 06:57:19 +0600
commit651ad35ce0f0ee9d04db085c50c29441b47bc825 (patch)
treeba75db3f2dca5f5c7641c0b0c03d34a411395692 /youtube_dl/extractor
parent6a0f9a24d0b8d979579276a7648df444634a5a50 (diff)
[tagesschau] Relax _VALID_URL
Diffstat (limited to 'youtube_dl/extractor')
-rw-r--r--youtube_dl/extractor/tagesschau.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/youtube_dl/extractor/tagesschau.py b/youtube_dl/extractor/tagesschau.py
index a71fbad7d..f6102c224 100644
--- a/youtube_dl/extractor/tagesschau.py
+++ b/youtube_dl/extractor/tagesschau.py
@@ -125,7 +125,7 @@ class TagesschauPlayerIE(InfoExtractor):
class TagesschauIE(InfoExtractor):
- _VALID_URL = r'https?://(?:www\.)?tagesschau\.de/[^/]+/(?:[^/]+/)*?[^/#?]+?(?P<id>-?[0-9]+)(?:~_?[^/#?]+?)?\.html'
+ _VALID_URL = r'https?://(?:www\.)?tagesschau\.de/(?P<path>[^/]+/(?:[^/]+/)*?[^/#?]+?(?P<id>-?[0-9]+)?)(?:~_?[^/#?]+?)?\.html'
_TESTS = [{
'url': 'http://www.tagesschau.de/multimedia/video/video-102143.html',
@@ -197,6 +197,9 @@ class TagesschauIE(InfoExtractor):
}, {
'url': 'http://www.tagesschau.de/multimedia/video/video-102303~_bab-sendung-211.html',
'only_matching': True,
+ }, {
+ 'url': 'http://www.tagesschau.de/100sekunden/index.html',
+ 'only_matching': True,
}]
@classmethod
@@ -256,7 +259,8 @@ class TagesschauIE(InfoExtractor):
return formats
def _real_extract(self, url):
- video_id = self._match_id(url)
+ mobj = re.match(self._VALID_URL, url)
+ video_id = mobj.group('id') or mobj.group('path')
display_id = video_id.lstrip('-')
webpage = self._download_webpage(url, display_id)