mirror of
https://codeberg.org/polarisfm/youtube-dl
synced 2025-01-08 14:17:54 +01:00
[medialaan] Fix clips downloading
This commit is contained in:
parent
fdfb32a0dd
commit
2cd20b353a
@ -64,8 +64,6 @@ class MedialaanIE(GigyaBaseIE):
|
|||||||
'ext': 'mp4',
|
'ext': 'mp4',
|
||||||
'title': '"Veronique liegt!"',
|
'title': '"Veronique liegt!"',
|
||||||
'description': 'md5:1385e2b743923afe54ba4adc38476155',
|
'description': 'md5:1385e2b743923afe54ba4adc38476155',
|
||||||
'timestamp': 1489002029,
|
|
||||||
'upload_date': '20170308',
|
|
||||||
'duration': 96,
|
'duration': 96,
|
||||||
},
|
},
|
||||||
}, {
|
}, {
|
||||||
@ -147,21 +145,14 @@ class MedialaanIE(GigyaBaseIE):
|
|||||||
|
|
||||||
# clip, no authentication required
|
# clip, no authentication required
|
||||||
if not vod_id:
|
if not vod_id:
|
||||||
player = self._parse_json(
|
video = self._parse_json(self._search_regex(r'"video":({.+?}}]})', webpage, 'video', default='{}'), video_id)
|
||||||
self._search_regex(
|
metadata = self._parse_json(self._search_regex(r'{"metadata":({.+?})', webpage, 'metadata', default='{}'), video_id)
|
||||||
r'vmmaplayer\(({.+?})\);', webpage, 'vmma player',
|
if video:
|
||||||
default=''),
|
|
||||||
video_id, transform_source=lambda s: '[%s]' % s, fatal=False)
|
|
||||||
if player:
|
|
||||||
video = player[-1]
|
|
||||||
if video['videoUrl'] in ('http', 'https'):
|
|
||||||
return self.url_result(video['url'], MedialaanIE.ie_key())
|
|
||||||
info = {
|
info = {
|
||||||
'id': video_id,
|
'id': video_id,
|
||||||
'url': video['videoUrl'],
|
'url': video.get('formats')[0].get('url'),
|
||||||
'title': video['title'],
|
'title': metadata.get('videoTitle'),
|
||||||
'thumbnail': video.get('imageUrl'),
|
'thumbnail': video.get('poster'),
|
||||||
'timestamp': int_or_none(video.get('createdDate')),
|
|
||||||
'duration': int_or_none(video.get('duration')),
|
'duration': int_or_none(video.get('duration')),
|
||||||
}
|
}
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user