2013-06-23 16:22:08 -04:00
|
|
|
from .common import InfoExtractor
|
2020-11-19 14:22:59 -05:00
|
|
|
from .jwplatform import JWPlatformIE
|
2013-06-23 16:22:08 -04:00
|
|
|
|
|
|
|
|
|
|
|
class SpiegelIE(InfoExtractor):
|
2020-11-19 14:22:59 -05:00
|
|
|
_UUID_RE = r'[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}'
|
2024-06-11 19:09:58 -04:00
|
|
|
_VALID_URL = rf'https?://(?:www\.)?(?:spiegel|manager-magazin)\.de(?:/[^/]+)+/[^/]*-(?P<id>[0-9]+|{_UUID_RE})(?:-embed|-iframe)?(?:\.html)?(?:$|[#?])'
|
2013-11-15 19:33:12 -05:00
|
|
|
_TESTS = [{
|
2014-01-31 08:00:55 -05:00
|
|
|
'url': 'http://www.spiegel.de/video/vulkan-tungurahua-in-ecuador-ist-wieder-aktiv-video-1259285.html',
|
2020-11-19 14:22:59 -05:00
|
|
|
'md5': '50c7948883ec85a3e431a0a44b7ad1d6',
|
2014-01-31 08:00:55 -05:00
|
|
|
'info_dict': {
|
2020-11-19 14:22:59 -05:00
|
|
|
'id': 'II0BUyxY',
|
|
|
|
'display_id': '1259285',
|
2014-06-21 05:31:18 -04:00
|
|
|
'ext': 'mp4',
|
2020-11-19 14:22:59 -05:00
|
|
|
'title': 'Vulkan Tungurahua in Ecuador ist wieder aktiv - DER SPIEGEL - Wissenschaft',
|
2014-06-21 05:31:18 -04:00
|
|
|
'description': 'md5:8029d8310232196eb235d27575a8b9f4',
|
2020-11-19 14:22:59 -05:00
|
|
|
'duration': 48.0,
|
2016-07-05 06:46:25 -04:00
|
|
|
'upload_date': '20130311',
|
2020-11-19 14:22:59 -05:00
|
|
|
'timestamp': 1362997920,
|
2014-01-31 08:00:55 -05:00
|
|
|
},
|
2014-06-21 05:31:18 -04:00
|
|
|
}, {
|
2014-01-31 08:00:55 -05:00
|
|
|
'url': 'http://www.spiegel.de/video/schach-wm-videoanalyse-des-fuenften-spiels-video-1309159.html',
|
2020-11-19 14:22:59 -05:00
|
|
|
'only_matching': True,
|
2014-11-13 09:02:31 -05:00
|
|
|
}, {
|
2020-11-19 14:22:59 -05:00
|
|
|
'url': 'https://www.spiegel.de/video/eifel-zoo-aufregung-um-ausgebrochene-raubtiere-video-99018031.html',
|
|
|
|
'only_matching': True,
|
2015-07-26 06:57:06 -04:00
|
|
|
}, {
|
2020-11-19 14:22:59 -05:00
|
|
|
'url': 'https://www.spiegel.de/panorama/urteile-im-goldmuenzenprozess-haftstrafen-fuer-clanmitglieder-a-aae8df48-43c1-4c61-867d-23f0a2d254b7',
|
2015-07-26 06:57:06 -04:00
|
|
|
'only_matching': True,
|
2018-01-17 10:03:56 -05:00
|
|
|
}, {
|
|
|
|
'url': 'http://www.spiegel.de/video/spiegel-tv-magazin-ueber-guellekrise-in-schleswig-holstein-video-99012776.html',
|
|
|
|
'only_matching': True,
|
2020-11-19 14:22:59 -05:00
|
|
|
}, {
|
|
|
|
'url': 'http://www.spiegel.de/sport/sonst/badminton-wm-die-randsportart-soll-populaerer-werden-a-987092.html',
|
|
|
|
'only_matching': True,
|
2013-11-15 19:33:12 -05:00
|
|
|
}]
|
2013-06-23 16:22:08 -04:00
|
|
|
|
|
|
|
def _real_extract(self, url):
|
2014-11-13 08:45:17 -05:00
|
|
|
video_id = self._match_id(url)
|
2020-11-19 14:22:59 -05:00
|
|
|
webpage = self._download_webpage(url, video_id)
|
|
|
|
media_id = self._html_search_regex(
|
|
|
|
r'("|["\'])mediaId\1\s*:\s*("|["\'])(?P<id>(?:(?!\2).)+)\2',
|
|
|
|
webpage, 'media id', group='id')
|
2014-01-31 08:00:55 -05:00
|
|
|
return {
|
2018-05-27 19:10:01 -04:00
|
|
|
'_type': 'url_transparent',
|
2013-06-23 16:22:08 -04:00
|
|
|
'id': video_id,
|
2020-11-19 14:22:59 -05:00
|
|
|
'display_id': video_id,
|
2024-06-11 19:09:58 -04:00
|
|
|
'url': f'jwplatform:{media_id}',
|
2020-11-19 14:22:59 -05:00
|
|
|
'title': self._og_search_title(webpage, default=None),
|
|
|
|
'ie_key': JWPlatformIE.ie_key(),
|
2013-06-23 16:22:08 -04:00
|
|
|
}
|