From c9e13179275e7643915ec2b4d70237e2a1f5610e Mon Sep 17 00:00:00 2001 From: Ishab Ahmed Date: Sat, 1 Apr 2023 16:11:23 +0100 Subject: [PATCH] [infomaniak] allow optional fields --- youtube_dl/extractor/infomaniak.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/youtube_dl/extractor/infomaniak.py b/youtube_dl/extractor/infomaniak.py index 2a7686be4..1632e4076 100644 --- a/youtube_dl/extractor/infomaniak.py +++ b/youtube_dl/extractor/infomaniak.py @@ -14,7 +14,6 @@ class InfomaniakVOD2IE(InfoExtractor): 'id': '1jhvl2uq7kr4y', 'ext': 'mp4', 'title': 'RolandCarey2016-05-04.mp4', - 'description': '', 'thumbnail': 'https://res.vod2.infomaniak.com/1/vod/thumbnail/1jhvl2uq8yqqv.jpg', 'duration': 221, } @@ -30,17 +29,15 @@ class InfomaniakVOD2IE(InfoExtractor): url = data['source']['url'] title = data['title'] - description = '' - thumbnail = data['image']['url'] - duration = data['duration'] + thumbnail = data.get('image').get('url') + duration = data.get('duration') - video_mimetype = data['source']['mimetype'] + video_mimetype = data.get('source').get('mimetype') info_dict = { 'id': video_id, 'url': url, 'title': title, - 'description': description, 'thumbnail': thumbnail, 'duration': duration, }