summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorSergey M․ <[email protected]>2021-06-05 23:42:25 +0700
committerSergey M․ <[email protected]>2021-06-05 23:42:25 +0700
commit943070af4a9e13ef2b81c5e484d9c799f1845aab (patch)
treecd2c5b36c53da4b6058b56db49bc967b9081180f
parent82f3993ba3f4d435d3bc9e37426ab225f5549510 (diff)
downloadyoutube-dl-943070af4a9e13ef2b81c5e484d9c799f1845aab.tar.gz
youtube-dl-943070af4a9e13ef2b81c5e484d9c799f1845aab.zip
[orf:tvthek] Fix thumbnails extraction (closes #29217)
-rw-r--r--youtube_dl/extractor/orf.py21
1 files changed, 20 insertions, 1 deletions
diff --git a/youtube_dl/extractor/orf.py b/youtube_dl/extractor/orf.py
index 3fadbcbea..ed8a9a841 100644
--- a/youtube_dl/extractor/orf.py
+++ b/youtube_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 {