projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
89c15fe
)
[spiegeltv] Match hash-style URLs (Closes #4210)
author
Philipp Hagemeister
<phihag@phihag.de>
Sat, 15 Nov 2014 23:40:09 +0000
(
00:40
+0100)
committer
Philipp Hagemeister
<phihag@phihag.de>
Sat, 15 Nov 2014 23:40:09 +0000
(
00:40
+0100)
youtube_dl/extractor/spiegeltv.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/spiegeltv.py
b/youtube_dl/extractor/spiegeltv.py
index 06838f78d91d607ce0ee48327e9450a3ea26eca3..ef5e7c08bb8ac6f9c90b656b863fbf2bd1cca99a 100644
(file)
--- a/
youtube_dl/extractor/spiegeltv.py
+++ b/
youtube_dl/extractor/spiegeltv.py
@@
-6,7
+6,7
@@
from ..utils import float_or_none
class SpiegeltvIE(InfoExtractor):
class SpiegeltvIE(InfoExtractor):
- _VALID_URL = r'https?://(?:www\.)?spiegel\.tv/filme/(?P<id>[\-a-z0-9]+)'
+ _VALID_URL = r'https?://(?:www\.)?spiegel\.tv/
(?:#/)?
filme/(?P<id>[\-a-z0-9]+)'
_TESTS = [{
'url': 'http://www.spiegel.tv/filme/flug-mh370/',
'info_dict': {
_TESTS = [{
'url': 'http://www.spiegel.tv/filme/flug-mh370/',
'info_dict': {
@@
-20,9
+20,14
@@
class SpiegeltvIE(InfoExtractor):
# rtmp download
'skip_download': True,
}
# rtmp download
'skip_download': True,
}
+ }, {
+ 'url': 'http://www.spiegel.tv/#/filme/alleskino-die-wahrheit-ueber-maenner/',
+ 'only_matching': True,
}]
def _real_extract(self, url):
}]
def _real_extract(self, url):
+ if '/#/' in url:
+ url = url.replace('/#/', '/')
video_id = self._match_id(url)
webpage = self._download_webpage(url, video_id)
title = self._html_search_regex(r'<h1.*?>(.*?)</h1>', webpage, 'title')
video_id = self._match_id(url)
webpage = self._download_webpage(url, video_id)
title = self._html_search_regex(r'<h1.*?>(.*?)</h1>', webpage, 'title')