mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2025-05-05 13:17:31 +00:00
[infomaniak] allow optional fields
This commit is contained in:
parent
562ab2cd47
commit
c9e1317927
@ -14,7 +14,6 @@ class InfomaniakVOD2IE(InfoExtractor):
|
|||||||
'id': '1jhvl2uq7kr4y',
|
'id': '1jhvl2uq7kr4y',
|
||||||
'ext': 'mp4',
|
'ext': 'mp4',
|
||||||
'title': 'RolandCarey2016-05-04.mp4',
|
'title': 'RolandCarey2016-05-04.mp4',
|
||||||
'description': '',
|
|
||||||
'thumbnail': 'https://res.vod2.infomaniak.com/1/vod/thumbnail/1jhvl2uq8yqqv.jpg',
|
'thumbnail': 'https://res.vod2.infomaniak.com/1/vod/thumbnail/1jhvl2uq8yqqv.jpg',
|
||||||
'duration': 221,
|
'duration': 221,
|
||||||
}
|
}
|
||||||
@ -30,17 +29,15 @@ class InfomaniakVOD2IE(InfoExtractor):
|
|||||||
|
|
||||||
url = data['source']['url']
|
url = data['source']['url']
|
||||||
title = data['title']
|
title = data['title']
|
||||||
description = ''
|
thumbnail = data.get('image').get('url')
|
||||||
thumbnail = data['image']['url']
|
duration = data.get('duration')
|
||||||
duration = data['duration']
|
|
||||||
|
|
||||||
video_mimetype = data['source']['mimetype']
|
video_mimetype = data.get('source').get('mimetype')
|
||||||
|
|
||||||
info_dict = {
|
info_dict = {
|
||||||
'id': video_id,
|
'id': video_id,
|
||||||
'url': url,
|
'url': url,
|
||||||
'title': title,
|
'title': title,
|
||||||
'description': description,
|
|
||||||
'thumbnail': thumbnail,
|
'thumbnail': thumbnail,
|
||||||
'duration': duration,
|
'duration': duration,
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user