[applepodcasts] Extract default thumbnail image
authordirkf <fieldhouse@gmx.net>
Thu, 9 Dec 2021 01:35:35 +0000 (01:35 +0000)
committerdirkf <fieldhouse@gmx.net>
Sat, 5 Feb 2022 02:32:45 +0000 (02:32 +0000)
youtube_dl/extractor/applepodcasts.py

index dd413a2890aec6ec436bbde06c80bc1da3a7170d..95e0f663c852c8c89a262e2e10382a3a0e779f53 100644 (file)
@@ -27,6 +27,7 @@ class ApplePodcastsIE(InfoExtractor):
             'timestamp': 1593932400,
             'duration': 6454,
             'series': 'The Tim Dillon Show',
+            'thumbnail': 're:.+[.](png|jpe?g|webp)',
         }
     }, {
         'url': 'https://podcasts.apple.com/podcast/207-whitney-webb-returns/id1135137367?i=1000482637777',
@@ -83,6 +84,7 @@ class ApplePodcastsIE(InfoExtractor):
             'timestamp': parse_iso8601(episode.get('releaseDateTime')),
             'duration': int_or_none(episode.get('durationInMilliseconds'), 1000),
             'series': series,
+            'thumbnail': self._og_search_thumbnail(webpage),
         }]
         self._sort_formats(info)
         info = info[0]