mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-12-14 13:17:00 +01:00
[spiegeltv] Match hash-style URLs (Closes #4210)
This commit is contained in:
parent
89c15fe0b3
commit
939fe70de0
@ -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 = [{
|
_TESTS = [{
|
||||||
'url': 'http://www.spiegel.tv/filme/flug-mh370/',
|
'url': 'http://www.spiegel.tv/filme/flug-mh370/',
|
||||||
'info_dict': {
|
'info_dict': {
|
||||||
@ -20,9 +20,14 @@ class SpiegeltvIE(InfoExtractor):
|
|||||||
# rtmp download
|
# rtmp download
|
||||||
'skip_download': True,
|
'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)
|
video_id = self._match_id(url)
|
||||||
webpage = self._download_webpage(url, video_id)
|
webpage = self._download_webpage(url, video_id)
|
||||||
title = self._html_search_regex(r'<h1.*?>(.*?)</h1>', webpage, 'title')
|
title = self._html_search_regex(r'<h1.*?>(.*?)</h1>', webpage, 'title')
|
||||||
|
Loading…
Reference in New Issue
Block a user