From 2c5e02a57ff8d37be2288fb78298903c6667d7bc Mon Sep 17 00:00:00 2001 From: dirkf Date: Sun, 9 Apr 2023 02:29:00 +0100 Subject: [PATCH] Rename webpage appropriately, trigger valid tests --- youtube_dl/extractor/infomaniak.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/youtube_dl/extractor/infomaniak.py b/youtube_dl/extractor/infomaniak.py index 18f1769b9..d737b0d1d 100644 --- a/youtube_dl/extractor/infomaniak.py +++ b/youtube_dl/extractor/infomaniak.py @@ -42,14 +42,14 @@ class InfomaniakVOD2IE(InfoExtractor): video_id = self._match_id(url) # no useful data in given url, formatted url below reveals json data data_url = 'https://res.vod2.infomaniak.com/{0}/vod/share/{1}'.format(video_id[0], video_id) - webpage = self._download_json(data_url, video_id)['data']['media'][0] + media = self._download_json(data_url, video_id)['data']['media'][0] - url = webpage['source']['url'] - title = webpage['title'] - thumbnail = traverse_obj(webpage, ('image', 'url'), expected_type=url_or_none) - duration = traverse_obj(webpage, 'duration', expected_type=int_or_none) + url = media['source']['url'] + title = media['title'] + thumbnail = traverse_obj(media, ('image', 'url'), expected_type=url_or_none) + duration = traverse_obj(media, 'duration', expected_type=int_or_none) - video_mimetype = traverse_obj(webpage, ('source', 'mimetype'), expected_type=lambda x: x.strip() or None) + video_mimetype = traverse_obj(media, ('source', 'mimetype'), expected_type=lambda x: x.strip() or None) info_dict = { 'id': video_id,