From 9cced7b3d2edf6ff8d31033383757cf9a7d5107d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=3D=3FUTF-8=3Fq=3FSergey=3D20M=3DE2=3D80=3DA4=3F=3D?= Date: Mon, 21 Jun 2021 20:19:28 +0200 Subject: [PATCH] [orf:tvthek] Fix thumbnails extraction (closes #29217) --- haruhi_dl/extractor/orf.py | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/haruhi_dl/extractor/orf.py b/haruhi_dl/extractor/orf.py index 3fadbcbea..ed8a9a841 100644 --- a/haruhi_dl/extractor/orf.py +++ b/haruhi_dl/extractor/orf.py @@ -140,6 +140,25 @@ class ORFTVthekIE(InfoExtractor): }) upload_date = unified_strdate(sd.get('created_date')) + + thumbnails = [] + preview = sd.get('preview_image_url') + if preview: + thumbnails.append({ + 'id': 'preview', + 'url': preview, + 'preference': 0, + }) + image = sd.get('image_full_url') + if not image and len(data_jsb) == 1: + image = self._og_search_thumbnail(webpage) + if image: + thumbnails.append({ + 'id': 'full', + 'url': image, + 'preference': 1, + }) + entries.append({ '_type': 'video', 'id': video_id, @@ -149,7 +168,7 @@ class ORFTVthekIE(InfoExtractor): 'description': sd.get('description'), 'duration': int_or_none(sd.get('duration_in_seconds')), 'upload_date': upload_date, - 'thumbnail': sd.get('image_full_url'), + 'thumbnails': thumbnails, }) return {