projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
6a0f9a2
)
[tagesschau] Relax _VALID_URL
author
Sergey M․
<dstftw@gmail.com>
Sun, 1 May 2016 00:57:19 +0000
(06:57 +0600)
committer
Sergey M․
<dstftw@gmail.com>
Sun, 1 May 2016 00:57:19 +0000
(06:57 +0600)
youtube_dl/extractor/tagesschau.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/tagesschau.py
b/youtube_dl/extractor/tagesschau.py
index a71fbad7d9fb4897c2d4fefc44fee6f4263f688a..f6102c22431460c2ab6df554b17f4a57ce1c3974 100644
(file)
--- a/
youtube_dl/extractor/tagesschau.py
+++ b/
youtube_dl/extractor/tagesschau.py
@@
-125,7
+125,7
@@
class TagesschauPlayerIE(InfoExtractor):
class TagesschauIE(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',
_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/multimedia/video/video-102303~_bab-sendung-211.html',
'only_matching': True,
+ }, {
+ 'url': 'http://www.tagesschau.de/100sekunden/index.html',
+ 'only_matching': True,
}]
@classmethod
}]
@classmethod
@@
-256,7
+259,8
@@
class TagesschauIE(InfoExtractor):
return formats
def _real_extract(self, url):
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)
display_id = video_id.lstrip('-')
webpage = self._download_webpage(url, display_id)