mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-02 17:22:31 +01:00
[medialaan] Fix videos with missing videoUrl
A rough trick to get around the two different json styles medialaan seems to be using. Fix for these example videos: https://vtmkzoom.be/video?aid=45724 https://vtmkzoom.be/video?aid=45425
This commit is contained in:
parent
4d9fc40100
commit
4050be78e5
@ -17,7 +17,7 @@
|
|||||||
class MedialaanIE(InfoExtractor):
|
class MedialaanIE(InfoExtractor):
|
||||||
_VALID_URL = r'''(?x)
|
_VALID_URL = r'''(?x)
|
||||||
https?://
|
https?://
|
||||||
(?:www\.)?
|
(?:www\.|nieuws\.)?
|
||||||
(?:
|
(?:
|
||||||
(?P<site_id>vtm|q2|vtmkzoom)\.be/
|
(?P<site_id>vtm|q2|vtmkzoom)\.be/
|
||||||
(?:
|
(?:
|
||||||
@ -85,6 +85,22 @@ class MedialaanIE(InfoExtractor):
|
|||||||
# clip
|
# clip
|
||||||
'url': 'http://vtmkzoom.be/k3-dansstudio/een-nieuw-seizoen-van-k3-dansstudio',
|
'url': 'http://vtmkzoom.be/k3-dansstudio/een-nieuw-seizoen-van-k3-dansstudio',
|
||||||
'only_matching': True,
|
'only_matching': True,
|
||||||
|
}, {
|
||||||
|
# http/s redirect
|
||||||
|
'url': 'https://vtmkzoom.be/video?aid=45724',
|
||||||
|
'info_dict': {
|
||||||
|
'id': '257136373657000',
|
||||||
|
'ext': 'mp4',
|
||||||
|
'title': 'K3 Dansstudio Ushuaia afl.6',
|
||||||
|
},
|
||||||
|
'params': {
|
||||||
|
'skip_download': True,
|
||||||
|
},
|
||||||
|
'skip': 'Requires account credentials',
|
||||||
|
}, {
|
||||||
|
# nieuws.vtm.be
|
||||||
|
'url': 'https://nieuws.vtm.be/stadion/stadion/genk-nog-moeilijk-programma',
|
||||||
|
'only_matching': True,
|
||||||
}]
|
}]
|
||||||
|
|
||||||
def _real_initialize(self):
|
def _real_initialize(self):
|
||||||
@ -146,6 +162,8 @@ def _real_extract(self, url):
|
|||||||
video_id, transform_source=lambda s: '[%s]' % s, fatal=False)
|
video_id, transform_source=lambda s: '[%s]' % s, fatal=False)
|
||||||
if player:
|
if player:
|
||||||
video = player[-1]
|
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['videoUrl'],
|
||||||
|
Loading…
Reference in New Issue
Block a user